Ejemplo n.º 1
0
    def __init__(self, parent, ID=0, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, prefsIO=None):

        wx.lib.scrolledpanel.ScrolledPanel.__init__(self, parent, -1, style=wx.TAB_TRAVERSAL|wx.NO_BORDER)

        # members
        self._xfiles  = xFiles()
        self._prefsIO = self._check_prefs(prefsIO)
        try:
            self._ccbmultiple = self._prefsIO.GetValue('F_CCB_MULTIPLE')
        except Exception:
            self._ccbmultiple = False

        # ... the list of files
        self._ccbsizer = wx.BoxSizer( wx.VERTICAL )
        self.SetSizer( self._ccbsizer )

        spEVT_FILE_CHECK(self,  self.OnCheck)
        spEVT_FILE_WANDER(self, self.OnWander)
        spEVT_SETTINGS(self,    self.OnSettings)

        self.SetBackgroundColour( self._prefsIO.GetValue('M_BG_COLOUR') )
        self.SetSize(wx.Size(180, 300))
        self.SetAutoLayout( True )
        self.Layout()
        self.SetupScrolling()
Ejemplo n.º 2
0
    def __init__(self, parent, ID=0, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, prefsIO=None):

        wx.lib.scrolledpanel.ScrolledPanel.__init__(self, parent, -1, style=wx.TAB_TRAVERSAL|wx.SIMPLE_BORDER)

        # members
        self._xfiles  = xFiles()
        self._prefsIO = self._check_prefs(prefsIO)
        try:
            self._ccbmultiple = self._prefsIO.GetValue('F_CCB_MULTIPLE')
        except Exception:
            self._ccbmultiple = False

        # create the sizer items:

        # ... a text to introduce the panel
        self._text = wx.StaticText(self, -1, "List of files:", size=(150,-1), style=wx.TE_READONLY|wx.NO_BORDER)
        font = self._prefsIO.GetValue('M_FONT')
        font.SetWeight(wx.BOLD)
        self._text.SetFont( font )
        self._text.SetBackgroundColour( self._prefsIO.GetValue('M_BG_COLOUR') )
        self._text.SetForegroundColour( self._prefsIO.GetValue('M_FG_COLOUR') )

        # ... the list of files
        self._ccbsizer = wx.BoxSizer( wx.VERTICAL )

        # create the main sizer
        sizer = wx.BoxSizer( wx.VERTICAL )
        sizer.Add(self._text, proportion=0, flag=wx.ALL, border=5 )
        sizer.Add(self._ccbsizer, proportion=1, flag=wx.ALL, border=5 )
        self.SetSizer( sizer )

        spEVT_FILE_CHECK(self,  self.OnCheck)
        spEVT_FILE_WANDER(self, self.OnWander)
        spEVT_SETTINGS(self,    self.OnSettings)

        self.SetBackgroundColour( self._prefsIO.GetValue('M_BG_COLOUR') )
        self.SetSize(wx.Size(180, 300))
        self.SetAutoLayout( True )
        self.Layout()
        self.SetupScrolling()