PEATDB/Ekin/Ekin_main.py
def addedit_comments(self,event=None):
        """Show window with specific comments for this dataset"""

        self.commentframe=Toplevel()
        self.commentframe.title('Add Comments')
        self.commentframe.geometry("300x300")
        self.set_geometry(self.ekin_win,self.commentframe)
        row=0
        column=0
        import tkFont
        thefont = tkFont.Font ( family="Helvetica", size=11, weight="bold" )

        yscrollbar=Scrollbar(self.commentframe,orient='vertical',width=14)
        yscrollbar.grid(row=row,column=2,sticky='news',padx=2)
        xscrollbar=Scrollbar(self.commentframe,orient='horizontal',width=14)
        xscrollbar.grid(row=row+1,column=0,columnspan=2,sticky='news')
        self.details=Text(self.commentframe,background='white',
                      foreground='black',
                      state=NORMAL,
                      exportselection=1,
                      yscrollcommand=yscrollbar.set,
                      xscrollcommand=xscrollbar.set,
                      wrap='word',
                      font=thefont,
                      bg='lightgray')
        self.details.config(width=60)
        self.details.config(width=24)
        yscrollbar.config(command=self.details.yview)
        xscrollbar.config(command=self.details.xview)
        self.details.grid(row=0,column=0,columnspan=2,sticky='NEWS',padx=2,pady=2)
        self.details.config(state=NORMAL)
        x=Button(self.commentframe,text='save & close',command=self.save_comments)
        x.grid(row=3,column=0,sticky='NEWS',padx=3,pady=3)
        self.commentframe.rowconfigure(0,weight=1)
        self.commentframe.columnconfigure(0,weight=1)

        d = self.currentdataset.get()
        meta = self.E.getMetaData(d)
        if d != None:
            if meta.has_key('comment'):
                self.details.insert(END,meta['comment'])
        return
Show window with specific comments for this dataset
Show window with specific comments for this dataset
Show window with specific comments for this dataset
def addedit_comments(self,event=None):
        self.commentframe=Toplevel()
        self.commentframe.title('Add Comments')
        self.commentframe.geometry("300x300")
        self.set_geometry(self.ekin_win,self.commentframe)
        row=0
        column=0
        import tkFont
        thefont = tkFont.Font ( family="Helvetica", size=11, weight="bold" )
        yscrollbar=Scrollbar(self.commentframe,orient='vertical',width=14)
        yscrollbar.grid(row=row,column=2,sticky='news',padx=2)
        xscrollbar=Scrollbar(self.commentframe,orient='horizontal',width=14)
        xscrollbar.grid(row=row+1,column=0,columnspan=2,sticky='news')
        self.details=Text(self.commentframe,background='white',
                      foreground='black',
                      state=NORMAL,
                      exportselection=1,
                      yscrollcommand=yscrollbar.set,
                      xscrollcommand=xscrollbar.set,
                      wrap='word',
                      font=thefont,
                      bg='lightgray')
        self.details.config(width=60)
        self.details.config(width=24)
        yscrollbar.config(command=self.details.yview)
        xscrollbar.config(command=self.details.xview)
        self.details.grid(row=0,column=0,columnspan=2,sticky='NEWS',padx=2,pady=2)
        self.details.config(state=NORMAL)
        x=Button(self.commentframe,text='save & close',command=self.save_comments)
        x.grid(row=3,column=0,sticky='NEWS',padx=3,pady=3)
        self.commentframe.rowconfigure(0,weight=1)
        self.commentframe.columnconfigure(0,weight=1)
        d = self.currentdataset.get()
        meta = self.E.getMetaData(d)
        if d != None:
            if meta.has_key('comment'):
                self.details.insert(END,meta['comment'])
        return
def addedit_comments ( self , event = None ) : self . commentframe = Toplevel ( ) self . commentframe . title ( 'Add Comments' ) self . commentframe . geometry ( "300x300" ) self . set_geometry ( self . ekin_win , self . commentframe ) row = 0 column = 0 import tkFont thefont = tkFont . Font ( family = "Helvetica" , size = 11 , weight = "bold" ) yscrollbar = Scrollbar ( self . commentframe , orient = 'vertical' , width = 14 ) yscrollbar . grid ( row = row , column = 2 , sticky = 'news' , padx = 2 ) xscrollbar = Scrollbar ( self . commentframe , orient = 'horizontal' , width = 14 ) xscrollbar . grid ( row = row + 1 , column = 0 , columnspan = 2 , sticky = 'news' ) self . details = Text ( self . commentframe , background = 'white' , foreground = 'black' , state = NORMAL , exportselection = 1 , yscrollcommand = yscrollbar . set , xscrollcommand = xscrollbar . set , wrap = 'word' , font = thefont , bg = 'lightgray' ) self . details . config ( width = 60 ) self . details . config ( width = 24 ) yscrollbar . config ( command = self . details . yview ) xscrollbar . config ( command = self . details . xview ) self . details . grid ( row = 0 , column = 0 , columnspan = 2 , sticky = 'NEWS' , padx = 2 , pady = 2 ) self . details . config ( state = NORMAL ) x = Button ( self . commentframe , text = 'save & close' , command = self . save_comments ) x . grid ( row = 3 , column = 0 , sticky = 'NEWS' , padx = 3 , pady = 3 ) self . commentframe . rowconfigure ( 0 , weight = 1 ) self . commentframe . columnconfigure ( 0 , weight = 1 ) d = self . currentdataset . get ( ) meta = self . E . getMetaData ( d ) if d != None : if meta . has_key ( 'comment' ) : self . details . insert ( END , meta [ 'comment' ] ) return
Show window with specific comments for this dataset
Show window with specific comments for this dataset
"""Show window with specific comments for this dataset"""
self
event