示例#1
0
def vp_start_gui():
    '''Starting point when module is the main routine.'''
    global val, w, root
    root = Tk()
    top = New_Toplevel(root)
    _support.init(root, top)
    root.mainloop()
示例#2
0
def create_New_Toplevel(root, *args, **kwargs):
    '''Starting point when module is imported by another program.'''
    global w, w_win, rt
    rt = root
    w = Toplevel(root)
    top = New_Toplevel(w)
    _support.init(w, top, *args, **kwargs)
    return (w, top)
示例#3
0
def create_Web_Scraper_Manager(root, *args, **kwargs):
    '''Starting point when module is imported by another program.'''
    global w, w_win, rt
    rt = root
    w = Toplevel (root)
    _support.set_Tk_var()
    top = Web_Scraper_Manager (w)
    _support.init(w, top, *args, **kwargs)
    return (w, top)
示例#4
0
def start_gui():
    '''Starting point when module is the main routine.'''
    global val, w, root
    root = Tk()
    _support.set_Tk_var()
    global top
    top = Web_Scraper_Manager (root)
    _support.init(root, top)
    root.mainloop()
示例#5
0
 33 def create_Toplevel1(root, *args, **kwargs):
 34     '''Starting point when module is imported by another program.'''
 35     global w, w_win, rt
 36     rt = root
 37     w = tk.Toplevel (root)
 38     top = Toplevel1 (w)
 39     _support.init(w, top, *args, **kwargs)
 40     return (w, top)
 41 
 42 def destroy_Toplevel1():
 43     global w
 44     w.destroy()
 45     w = None
 46 
 47 class Toplevel1:
 48     def __init__(self, top=None):
 49         '''This class configures and populates the toplevel window.
 50            top is the toplevel containing window.'''
 51         _bgcolor = '#d9d9d9'  # X11 color: 'gray85'
 52         _fgcolor = '#000000'  # X11 color: 'black'
 53         _compcolor = '#d9d9d9' # X11 color: 'gray85'
 54         _ana1color = '#d9d9d9' # X11 color: 'gray85'
 55         _ana2color = '#ececec' # Closest X11 color: 'gray92'
 56         self.style = ttk.Style()
 57         if sys.platform == "win32":
 58             self.style.theme_use('winnative')
 59         self.style.configure('.',background=_bgcolor)
 60         self.style.configure('.',foreground=_fgcolor)
 61         self.style.configure('.',font="TkDefaultFont")
 62         self.style.map('.',background=
 63             [('selected', _compcolor), ('active',_ana2color)])
 64 
 65         top.geometry("242x168+344+142")
 66         top.title("New Toplevel")
 67         top.configure(background="#d9d9d9")
 68 
 69         self.TEntry1 = ttk.Entry(top)
 70         self.TEntry1.place(relx=0.207, rely=0.238, relheight=0.125
 71                 , relwidth=0.529)
 72         self.TEntry1.configure(takefocus="")
 73         self.TEntry1.configure(cursor="ibeam")
 74 
 75         self.TButton1 = ttk.Button(top)
 76         self.TButton1.place(relx=0.124, rely=0.536, height=24, width=77)
 77         self.TButton1.configure(takefocus="")
 78         self.TButton1.configure(text='''Tbutton''')
 79 
 80         self.TButton2 = ttk.Button(top)
 81         self.TButton2.place(relx=0.496, rely=0.536, height=24, width=77)
 82         self.TButton2.configure(takefocus="")
 83         self.TButton2.configure(text='''Tbutton''')
 84 
 85 if __name__ == '__main__':
 86     vp_start_gui()