Пример #1
0
    def __init__(self, parent, title, group="Window"):
        _GroupBase.__init__(self, parent, title, group)

        box = wx.StaticBoxSizer(wx.StaticBox(self, label=title), wx.VERTICAL)

        sizer = self.sizer = wx.GridBagSizer(2, 6)

        p = wx.StaticText(self, label="Foreground:")
        sizer.Add(p, pos=(0, 0), flag=wx.ALIGN_CENTRE_VERTICAL)

        p = self.fg = csel.ColourSelect(self)
        sizer.Add(p, pos=(0, 1), span=(1, 3), flag=wx.ALIGN_CENTRE_VERTICAL)

        p = wx.StaticText(self, label="Background:")
        sizer.Add(p, pos=(1, 0), flag=wx.ALIGN_CENTRE_VERTICAL)

        p = self.bg = csel.ColourSelect(self)
        sizer.Add(p, pos=(1, 1), span=(1, 3), flag=wx.ALIGN_CENTRE_VERTICAL)

        p = wx.StaticText(self, label="Style:")
        sizer.Add(p, pos=(2, 0), flag=wx.ALIGN_CENTRE_VERTICAL)

        p = self.ws = wx.Choice(self, choices=_window_styles)
        sizer.Add(p, pos=(2, 1), span=(1, 3), flag=wx.ALIGN_CENTRE_VERTICAL)

        box.Add(sizer)

        self.SetSizer(box)
Пример #2
0
    def __init__(self, parent, title, group="Hands"):
        _GroupBase.__init__(self, parent, title, group)

        box = wx.StaticBoxSizer(wx.StaticBox(self, label=title), wx.VERTICAL)

        sizer = self.sizer = wx.GridBagSizer(vgap=2, hgap=6)

        p = wx.StaticText(self, label="Border:")
        sizer.Add(p, pos=(0, 0), flag=wx.ALIGN_CENTRE_VERTICAL)

        p = self.bc = csel.ColourSelect(self)
        sizer.Add(p, pos=(0, 1), flag=wx.ALIGN_CENTRE_VERTICAL)

        p = self.bw = wx.SpinCtrl(self, size=(75, 21),
                                  min=0, max=100, value="75")
        sizer.Add(p, pos=(0, 2), span=(1, 2), flag=wx.ALIGN_CENTRE_VERTICAL)

        p = wx.StaticText(self, label="Fill:")
        sizer.Add(p, pos=(1, 0), flag=wx.ALIGN_CENTRE_VERTICAL)

        p = self.fc = csel.ColourSelect(self)
        sizer.Add(p, pos=(1, 1), flag=wx.ALIGN_CENTRE_VERTICAL)

        p = self.ls = wx.StaticText(self, label="Size:")
        sizer.Add(p, pos=(2, 0), flag=wx.ALIGN_CENTRE_VERTICAL)

        p = self.sz = wx.SpinCtrl(self, size=(75, 21),
                                  min=0, max=100, value="75")
        sizer.Add(p, pos=(2, 1), span=(1, 3), flag=wx.ALIGN_CENTRE_VERTICAL)

        box.Add(sizer)

        self.SetSizer(box)
Пример #3
0
    def __init__(self, parent, title, group="Face"):
        _Group_1.__init__(self, parent, title, group)

        sizer = self.sizer

        for widget in [self.ls, self.sz]:
            sizer.Detach(widget)
            widget.Destroy()
        sizer.Layout()

        p = wx.StaticText(self, label="Shadow:")
        sizer.Add(p, pos=(2, 0), flag=wx.ALIGN_CENTRE_VERTICAL)

        p = self.sw = csel.ColourSelect(self)
        sizer.Add(p, pos=(2, 1), span=(1, 3), flag=wx.ALIGN_CENTRE_VERTICAL)

        self.GetSizer().Layout()