Esempio n. 1
0
 def initWidgets(self):
     #self.layout = SimpleGridManager(1,3)
     self.label = manygui.Label(text="Manygui info:")
     self.add(self.label, left=10, top=10)
     self.txtAbout = manygui.TextArea(text=ABOUT_TEXT, enabled=0)
     self.add(self.txtAbout, left=10, right=10, top=(self.label,5), \
              bottom=45, hstretch=1, vstretch=1)
     self.btnOK = manygui.Button(text="OK")
     self.add(self.btnOK, right=10, bottom=10, hmove=1, vmove=1)
     link(self.btnOK, self.close)
Esempio n. 2
0
    def initWidgets(self, filters):

        dirMngr = self.dirMngr

        btnDirBack = self.btnDirBack = manygui.Button(text='<', size=(50,25))
        if dirMngr.currDirIsRoot():
            btnDirBack.enabled = 0
        self.add(btnDirBack, left=10, top=10)
        link(btnDirBack, self.goDirBack)

        btnDirFwd = self.btnDirFwd = manygui.Button(text='>', size=(50,25))
        btnDirFwd.enabled = 0
        self.add(btnDirFwd, left=(btnDirBack, 5), top=10)
        link(btnDirFwd, self.goDirFwd)

        frmDirs = self.frmDirs = manygui.Frame()
        frmDirs.layout = SimpleGridManager(3,1)
        self.add(frmDirs, left=10, rigth=10, top=(btnDirBack, 5), \
                 bottom=75, vstretch=1, hstretch=1)

        lbxDirOne = self.lbxDirOne = manygui.ListBox()
        #lbxDirOne.items = self.dirList.tripane[0]
        lbxDirOne.items = self.dirMngr.currDirCache
        lbxDirOne.selection = 0
        frmDirs.add(lbxDirOne)
        link(lbxDirOne, self.lbxSelect)

        lbxDirTwo = self.lbxDirTwo = manygui.ListBox()
        frmDirs.add(lbxDirTwo)
        link(lbxDirTwo, self.lbxSelect)

        lbxDirThree = self.lbxDirThree = manygui.ListBox()
        frmDirs.add(lbxDirThree)
        link(lbxDirThree, self.lbxSelect)

        btnCancel = self.btnCancel = manygui.Button(text='Cancel')
        self.add(btnCancel, right=10, top=(frmDirs, 5), hmove=1, vmove=1)
        link(self.btnCancel, self.close)

        btnOpen = self.btnOpen = manygui.Button(text='Open')
        self.add(btnOpen, right=10, top=(btnCancel, 5), hmove=1, vmove=1)
        link(self.btnOpen, self.open)

        lblLocation = self.lblLocation = manygui.Label(text='Location:', width=55)
        self.add(lblLocation, left=10, top=(frmDirs, 18), vmove=1)

        lblFilter = self.lblFilter = manygui.Label(text='Filter:', width=55)
        self.add(lblFilter, left=10, top=(lblLocation, 20), vmove=1)

        txtLocation = self.txtLocation = manygui.TextField(text=dirMngr.currDir)
        self.add(txtLocation, left=(lblLocation, 5), right=100, top=(frmDirs, 8), \
                 hstretch=1, vmove=1)
        link(txtLocation, self.changeDirs)

        cbxFilter = self.cbxFilter = manygui.ComboBox(items=filters)
        #txtFilter = self.txtFilter = TextField(text=dirMngr.filter)
        self.add(cbxFilter, left=(lblFilter, 5), right=100, top=(txtLocation, 10), \
                 hstretch=1, vmove=1)
        link(cbxFilter, self.applyFilter)
Esempio n. 3
0
 def widgetSetUp(self):
     if self._comps and not self._connected:
         #print '>> in widgetSetUp'
         link(self._popupBtn, self._handlePopup)
         link(self._itemLbx, self._handleSelection)
         self._connected = 1