PEATDB/Tables.py
def drawNavFrame(self):
        """Draw the frame for selecting pages when paging is on"""
        #print 'adding page frame'
        import Table_images
        self.navFrame = Frame(self.parentframe)
        self.navFrame.grid(row=4,column=0,columnspan=2,sticky='news',padx=1,pady=1,ipady=1)
        pagingbuttons = { 'start' : self.first_Page, 'prev' : self.prev_Page,
                          'next' : self.next_Page, 'end' : self.last_Page}
        images = { 'start' : Table_images.start(), 'prev' : Table_images.prev(),
                   'next' : Table_images.next(), 'end' : Table_images.end()}
        skeys=['start', 'prev', 'next', 'end']
        for i in skeys:
            b = Button(self.navFrame, text=i, command=pagingbuttons[i],
                        relief=GROOVE,
                        image=images[i])
            b.image = images[i]
            b.pack(side=LEFT, ipadx=1, ipady=1)
        Label(self.navFrame,text='Page '+str(self.currentpage+1)+' of '+ str(self.numpages),fg='white',
                  bg='#3366CC',relief=SUNKEN).pack(side=LEFT,ipadx=2,ipady=2,padx=4)
        #Label(self.navFrame,text='Goto Record:').pack(side=LEFT,padx=3)
        #self.gotorecordvar = StringVar()
        #Entry(self.navFrame,textvariable=self.gotorecordvar,
        #          width=8,bg='white').pack(side=LEFT,ipady=3,padx=2)
        Label(self.navFrame,text=str(self.rows)+' records').pack(side=LEFT,padx=3)
        Button(self.navFrame,text='Normal View',command=self.paging_Off,
                   bg='#99CCCC',relief=GROOVE).pack(side=LEFT,padx=3)
        return
Draw the frame for selecting pages when paging is on
Draw the frame for selecting pages when paging is on
Draw the frame for selecting pages when paging is on
def drawNavFrame(self):
        import Table_images
        self.navFrame = Frame(self.parentframe)
        self.navFrame.grid(row=4,column=0,columnspan=2,sticky='news',padx=1,pady=1,ipady=1)
        pagingbuttons = { 'start' : self.first_Page, 'prev' : self.prev_Page,
                          'next' : self.next_Page, 'end' : self.last_Page}
        images = { 'start' : Table_images.start(), 'prev' : Table_images.prev(),
                   'next' : Table_images.next(), 'end' : Table_images.end()}
        skeys=['start', 'prev', 'next', 'end']
        for i in skeys:
            b = Button(self.navFrame, text=i, command=pagingbuttons[i],
                        relief=GROOVE,
                        image=images[i])
            b.image = images[i]
            b.pack(side=LEFT, ipadx=1, ipady=1)
        Label(self.navFrame,text='Page '+str(self.currentpage+1)+' of '+ str(self.numpages),fg='white',
                  bg='#3366CC',relief=SUNKEN).pack(side=LEFT,ipadx=2,ipady=2,padx=4)
        Label(self.navFrame,text=str(self.rows)+' records').pack(side=LEFT,padx=3)
        Button(self.navFrame,text='Normal View',command=self.paging_Off,
                   bg='#99CCCC',relief=GROOVE).pack(side=LEFT,padx=3)
        return
def drawNavFrame ( self ) : import Table_images self . navFrame = Frame ( self . parentframe ) self . navFrame . grid ( row = 4 , column = 0 , columnspan = 2 , sticky = 'news' , padx = 1 , pady = 1 , ipady = 1 ) pagingbuttons = { 'start' : self . first_Page , 'prev' : self . prev_Page , 'next' : self . next_Page , 'end' : self . last_Page } images = { 'start' : Table_images . start ( ) , 'prev' : Table_images . prev ( ) , 'next' : Table_images . next ( ) , 'end' : Table_images . end ( ) } skeys = [ 'start' , 'prev' , 'next' , 'end' ] for i in skeys : b = Button ( self . navFrame , text = i , command = pagingbuttons [ i ] , relief = GROOVE , image = images [ i ] ) b . image = images [ i ] b . pack ( side = LEFT , ipadx = 1 , ipady = 1 ) Label ( self . navFrame , text = 'Page ' + str ( self . currentpage + 1 ) + ' of ' + str ( self . numpages ) , fg = 'white' , bg = '#3366CC' , relief = SUNKEN ) . pack ( side = LEFT , ipadx = 2 , ipady = 2 , padx = 4 ) Label ( self . navFrame , text = str ( self . rows ) + ' records' ) . pack ( side = LEFT , padx = 3 ) Button ( self . navFrame , text = 'Normal View' , command = self . paging_Off , bg = '#99CCCC' , relief = GROOVE ) . pack ( side = LEFT , padx = 3 ) return
Draw the frame for selecting pages when paging is on
Draw the frame for selecting pages when paging is on
"""Draw the frame for selecting pages when paging is on""" #print 'adding page frame' #Label(self.navFrame,text='Goto Record:').pack(side=LEFT,padx=3) #self.gotorecordvar = StringVar() #Entry(self.navFrame,textvariable=self.gotorecordvar, #          width=8,bg='white').pack(side=LEFT,ipady=3,padx=2)
self