当前位置: 首页>>代码示例>>Python>>正文


Python Notebook.pack方法代码示例

本文整理汇总了Python中ttk.Notebook.pack方法的典型用法代码示例。如果您正苦于以下问题:Python Notebook.pack方法的具体用法?Python Notebook.pack怎么用?Python Notebook.pack使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ttk.Notebook的用法示例。


在下文中一共展示了Notebook.pack方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: show_control

# 需要导入模块: from ttk import Notebook [as 别名]
# 或者: from ttk.Notebook import pack [as 别名]
def show_control(master, data):
    """Выводит блокнот управления с пятью закладками"""

    if data.is_restart:
        reload(control_a)
        reload(control_b)
        reload(control_c)
        reload(control_d)
        reload(control_e)
        reload(control_f)

    from control_a import show_goods
    from control_b import show_calc
    from control_c import show_sales_goods
    from control_d import show_sales
    from control_e import show_others
    from control_f import show_plus


    def tab_changes(tab):
        """функция, срабатывающая при нажатии закладок переключения
        между правыми (основными) фреймами"""

        window_names = controlTabs.tabs()
        index = window_names.index(controlTabs.select())

        if not FLAGS[index]:
            CONTROL[index](workArea[index], data)                   #нужна ли эта дата?
            FLAGS[index] = True
        else:
            CONTROL[index].renew()


    CONTROL = (show_goods, show_calc, show_sales_goods,
               show_sales, show_others, show_plus)

    FLAGS = [False, False, False, False, False, False]

    heads = (u' Товары ', u' Калькуляции ',
             u' Акционные товары ', u' Акционные цены ',
             u' Категории, скидки, причины списания ', u' Дополнительно ')

    workArea = []

    controlTabs = Notebook(master)
    for q in range (6):
        frame = Canvas(controlTabs, relief=GROOVE, highlightthickness=0)
        if USE_BACKGROUND:
            frame.create_image(0,0, anchor='nw', image=data.photo)
        controlTabs.add(frame, text=heads[q])
        workArea.append(frame)
    controlTabs.pack(side=TOP, fill=BOTH, expand=YES)
    controlTabs.bind('<<NotebookTabChanged>>', tab_changes)
    Style().configure("TNotebook.Tab", font=('Verdana', FONT_SIZE))
开发者ID:sychov,项目名称:conditer,代码行数:56,代码来源:control.py

示例2: __init__

# 需要导入模块: from ttk import Notebook [as 别名]
# 或者: from ttk.Notebook import pack [as 别名]
    def __init__(self, master):
        master.minsize(width=1500, height=1500)
        root = Frame(master)
        root.pack(side=TOP, fill=BOTH)
        master.title('Stocks evaluation - Sandeep Joshi (FE520)')

        n = Notebook(root)
        n.enable_traversal()
        n.pack(fill=BOTH)
        self._create_stat_tab(n)
        self._create_help_tab(n)
        self.data = {}
        self.start = ''
        self.end = ''
        self.tickers = []
        self.tree
开发者ID:Sandeep-Joshi,项目名称:stocks-comparison,代码行数:18,代码来源:Project.py

示例3: init_UI

# 需要导入模块: from ttk import Notebook [as 别名]
# 或者: from ttk.Notebook import pack [as 别名]
def init_UI():
	'''create tabs and required content'''

	# initialize main window
	main = Tk()
	main.title('data2knowledge')

	# component for 'tab' functionality
	n = Notebook(main)

	# initialize the various tabs
	EnrichTab(n, 'Enrich', main)
	ProcessTab(n, 'Process', main)
	MergeTab(n, 'Merge', main)
	LearningTab(n, 'Learn', main)
	ReportTab(n, 'Report', main)
	AboutTab(n, 'About', main)

	# finish up, return UI
	n.pack()
	return main
开发者ID:MarkMenagie,项目名称:EMR-pre-processing-pipeline,代码行数:23,代码来源:main.py

示例4: __init__

# 需要导入模块: from ttk import Notebook [as 别名]
# 或者: from ttk.Notebook import pack [as 别名]
    def __init__(self, master):
        
	self.fname="" 
        #global variables
        self.t1=StringVar()
        self.t2=StringVar()
        self.t3=StringVar()
        self.t4=StringVar()
        self.t5=StringVar()
        self.t6=StringVar()
        self.t7=StringVar()
        self.t8=StringVar()
        self.t9=StringVar()
        self.t10=StringVar()
        self.t11=StringVar()
        self.t12=StringVar()
        self.t13=StringVar()
        self.t14=StringVar()
        self.t15=StringVar()
        self.t16=StringVar()
        self.t17=StringVar()
        self.t18=StringVar()
        self.t19=StringVar()
        self.t20=StringVar()
        self.t21=StringVar()
        self.t22=StringVar()
        self.t23=StringVar()
        self.t24=StringVar()
        self.t25=StringVar()
        self.t26=StringVar()
        self.t27=StringVar()
        
        self.var1=StringVar()
        self.var2=StringVar()
        self.var3=StringVar()
        self.var4=StringVar()
        self.var5=StringVar()
        self.var6=StringVar()
        self.var7=StringVar()
        self.var8=StringVar()
        self.var9=StringVar()
        self.var10=StringVar()
        self.var11=StringVar()
        self.var12=StringVar()
        self.var13=StringVar()
        self.var14=StringVar()
        self.var15=StringVar()
        self.var16=StringVar()
        self.var17=StringVar()
        self.var18=StringVar()
        self.var19=StringVar()
        self.var20=StringVar()
        self.var21=StringVar()
        self.var22=StringVar()
        self.var23=StringVar()
        self.var24=StringVar()
        self.var25=StringVar()
        self.var26=StringVar()
        self.var27=StringVar()
        #end
        
        mymaster = Frame(master, name='mymaster') # create Frame in "root"
        mymaster.pack(fill=BOTH)
        #min and max size of window    
        #master.minsize(width=900, height=900)
        #master.maxsize(width=650, height=500)
        #end
        
        #title of window
        master.title("Aireplay-ng")
        #end
        
        #for the style of fonts
        self.customFont = tkFont.Font(family="Helvetica", size=12)
        self.myfont = tkFont.Font(family="Helvetica", size=10)
        self.myfont2 = tkFont.Font(family="Helvetica", size=8)
        self.headerfont=tkFont.Font(family="Helvetica", size=15,underline = True)
        self.myfontnew=tkFont.Font(family="Helvetica", size=11,underline = True)
        #end
        
        
       
        nb = Notebook(mymaster, name='nb') # create Notebook in "master"
        nb.pack(fill=BOTH, padx=2, pady=3) # fill "master" but pad sides
        #content frame
        self.frame_content = Frame(nb,name="frame_content", bg="white")
        self.frame_content.pack(fill=BOTH, side=TOP, expand=True)
        nb.add(self.frame_content, text="Filter-1") # add tab to Notebook
    
        # repeat for each tab
        self.frame_content2 = Frame(nb, name='frame_content2', bg="white")
        nb.add(self.frame_content2, text="Filter-2")
        self.frame_content3 = Frame(nb, name='frame_content3', bg="white")
        nb.add(self.frame_content3, text="Filter-3")
        
        self.frame_content7 = Frame(nb, name='frame_content7', bg="white")
        nb.add(self.frame_content7, text="Detect Devices")
        self.frame_content5 = Frame(nb, name='frame_content5', bg="white")
        nb.add(self.frame_content5, text="output")
        
#.........这里部分代码省略.........
开发者ID:AsmitaKatyayni,项目名称:Airvengers,代码行数:103,代码来源:Aireplay-ng.py

示例5: __init__

# 需要导入模块: from ttk import Notebook [as 别名]
# 或者: from ttk.Notebook import pack [as 别名]
class GUI:

    ## GUI variables
    titleText = 'PyCX Simulator'  # window title
    timeInterval = 0              # refresh time in milliseconds
    running = False
    modelFigure = None
    stepSize = 1
    currentStep = 0
    def __init__(self,title='PyCX Simulator',interval=0,stepSize=1,parameterSetters=[]):
        self.titleText = title
        self.timeInterval = interval
        self.stepSize = stepSize
        self.parameterSetters = parameterSetters
        self.varEntries = {}
        self.statusStr = ""
               
        self.initGUI()
    def initGUI(self):
        #create root window
        self.rootWindow = Tk()
        self.statusText = StringVar(value=self.statusStr) 
        self.setStatusStr("Simulation not yet started")

        self.rootWindow.wm_title(self.titleText)
        self.rootWindow.protocol('WM_DELETE_WINDOW',self.quitGUI)
        self.rootWindow.geometry('550x400')
        self.rootWindow.columnconfigure(0, weight=1)
        self.rootWindow.rowconfigure(0, weight=1)
        
        self.notebook = Notebook(self.rootWindow)      
        self.notebook.grid(row=0,column=0,padx=2,pady=2,sticky='nswe')
        

        self.frameRun = Frame()
        self.frameSettings = Frame()
        self.frameParameters = Frame()
        self.frameInformation = Frame()          
        
        self.notebook.add(self.frameRun,text="Run")
        self.notebook.add(self.frameSettings,text="Settings")
        self.notebook.add(self.frameParameters,text="Parameters")
        self.notebook.add(self.frameInformation,text="Info")
     
        self.notebook.pack(expand=YES, fill=BOTH, padx=5, pady=5 ,side=TOP)
        self.status = Label(self.rootWindow, width=40,height=3, relief=SUNKEN, bd=1,textvariable=self.statusText)
        self.status.grid(row=1,column=0,padx=2,pady=2,sticky='nswe')
        self.status.pack(side=TOP, fill=X, padx=1, pady=1, expand=NO)



        
        self.runPauseString = StringVar()
        self.runPauseString.set("Run")
        self.buttonRun = Button(self.frameRun,width=30,height=2,textvariable=self.runPauseString,command=self.runEvent)
        self.buttonRun.pack(side=TOP, padx=5, pady=5)



        self.showHelp(self.buttonRun,"Runs the simulation (or pauses the running simulation)")
        self.buttonStep = Button(self.frameRun,width=30,height=2,text='Step Once',command=self.stepOnce)
        self.buttonStep.pack(side=TOP, padx=5, pady=5)
        self.showHelp(self.buttonStep,"Steps the simulation only once")
        self.buttonReset = Button(self.frameRun,width=30,height=2,text='Reset',command=self.resetModel)
        self.buttonReset.pack(side=TOP, padx=5, pady=5) 
        self.showHelp(self.buttonReset,"Resets the simulation")
 
   
        
        can = Canvas(self.frameSettings)
        lab = Label(can, width=25,height=1,text="Step size ", justify=LEFT, anchor=W,takefocus=0)
        lab.pack(side='left')
        self.stepScale = Scale(can,from_=1, to=50, resolution=1,command=self.changeStepSize,orient=HORIZONTAL, width=25,length=150)
        self.stepScale.set(self.stepSize)
        self.showHelp(self.stepScale,"Skips model redraw during every [n] simulation steps\nResults in a faster model run.")
        self.stepScale.pack(side='left')    
        can.pack(side='top')
    
        can = Canvas(self.frameSettings)
        lab = Label(can, width=25,height=1,text="Step visualization delay in ms ", justify=LEFT, anchor=W,takefocus=0)
        lab.pack(side='left')
        self.stepDelay = Scale(can,from_=0, to=max(2000,self.timeInterval), resolution=10,command=self.changeStepDelay,orient=HORIZONTAL, width=25,length=150)
        self.stepDelay.set(self.timeInterval)
        self.showHelp(self.stepDelay,"The visualization of each step is delays by the given number of milliseconds.")
        self.stepDelay.pack(side='left')    
        can.pack(side='top')
        scrollInfo = Scrollbar(self.frameInformation)
        self.textInformation = Text(self.frameInformation, width=45,height=13,bg='lightgray',wrap=WORD,font=("Courier",10))
        scrollInfo.pack(side=RIGHT, fill=Y)
        self.textInformation.pack(side=LEFT,fill=BOTH,expand=YES)
        scrollInfo.config(command=self.textInformation.yview)
        self.textInformation.config(yscrollcommand=scrollInfo.set)
        for variableSetter in self.parameterSetters:
            can = Canvas(self.frameParameters)
            lab = Label(can, width=25,height=1,text=variableSetter.__name__+" ",anchor=W,takefocus=0)
            lab.pack(side='left')
            ent = Entry(can, width=11)
            ent.insert(0, str(variableSetter()))
            if variableSetter.__doc__ != None and len(variableSetter.__doc__) > 0:
                self.showHelp(ent,variableSetter.__doc__.strip())
#.........这里部分代码省略.........
开发者ID:joh,项目名称:cxboids,代码行数:103,代码来源:pycxsimulator.py

示例6: __init__

# 需要导入模块: from ttk import Notebook [as 别名]
# 或者: from ttk.Notebook import pack [as 别名]
    def __init__(self, master):
        
	self.fname="" 
        #global variables
        self.t1=StringVar()
        self.t2=StringVar()
        self.t3=StringVar()
        self.t4=StringVar()
        self.t5=StringVar()
        self.t6=StringVar()
        self.t7=StringVar()
        self.t8=StringVar()
        self.t9=StringVar()
        self.t10=StringVar()
        self.t11=StringVar()
        self.t12=StringVar()
        
        self.var1=StringVar()
        self.var2=StringVar()
        self.var3=StringVar()
        self.var4=StringVar()
        self.var5=StringVar()
        self.var6=StringVar()
        self.var7=StringVar()
        self.var8=StringVar()
        self.var9=StringVar()
        self.var10=StringVar()
        self.var11=StringVar()
        self.var12=StringVar()
        #end
        
        mymaster = Frame(master, name='mymaster') # create Frame in "root"
        mymaster.pack(fill=BOTH)
        #min and max size of window    
        #master.minsize(width=900, height=900)
        #master.maxsize(width=800, height=600)
        #end
        
        #title of window
        master.title("Airtun-ng")
        #end
        
        #for the style of fonts
        self.customFont = tkFont.Font(family="Helvetica", size=12)
        self.myfont = tkFont.Font(family="Helvetica", size=10)
        self.myfont2 = tkFont.Font(family="Helvetica", size=8)
        self.headerfont=tkFont.Font(family="Helvetica", size=15,underline = True)
        self.myfontnew=tkFont.Font(family="Helvetica", size=11,underline = True)
        #end
        
        
       
        nb = Notebook(mymaster, name='nb') # create Notebook in "master"
        nb.pack(fill=BOTH, padx=2, pady=3) # fill "master" but pad sides
        #content frame
        self.frame_content = Frame(nb,name="frame_content", bg="white")
        self.frame_content.pack(fill=BOTH, side=TOP, expand=True)
        nb.add(self.frame_content, text="Filter-1") # add tab to Notebook
    
        # repeat for each tab
        self.frame_content7 = Frame(nb, name='frame_content7', bg="white")
        nb.add(self.frame_content7, text="Detect Devices")
        self.frame_content5 = Frame(nb, name='frame_content5', bg="white")
        nb.add(self.frame_content5, text="output")
        
        #End
        
	#frame content 7
	Label(self.frame_content7, text = 'Aigraph-ng',font=self.headerfont, bg="white", padx=10, pady=10).grid(row = 0, column = 0)
        btndetect=Button(self.frame_content7, text = 'Detect', command =self.canvas_detect, height=2, width=15, font=self.customFont).grid(row = 1, column = 0, padx = 5, pady = 5)
		
	btndbrowse=Button(self.frame_content7, text = 'Attach File', command =self.browse_file, height=2, width=15, font=self.customFont).grid(row = 3, column = 0, padx = 5, pady = 5)	
	self.lilnew1=Listbox(self.frame_content7,bg="black", fg="white", font=self.myfont, selectmode=SINGLE, width=30, height=15)
        self.lilnew1.grid(row = 1, column = 1, rowspan=3)
	#End
	
        Label(self.frame_content, text = 'Airtun-ng',font=self.headerfont, bg="white", padx=10, pady=10).grid(row = 0, column = 0)
        Label(self.frame_content, text = 'Options :',font=self.myfontnew, bg="white").grid(row = 1, column = 1)
        #Button(self.frame_content, text = 'ivs', command =self.canvas_detect, height=2, width=15, font=self.customFont).grid(row = 2, column = 0, padx = 5, pady = 5)
        #Button(self.frame_content, text = 'gpsd', command =self.canvas_detect, height=2, width=15, font=self.customFont).grid(row = 2, column = 1, padx = 5, pady = 5)
        #Button(self.frame_content, text = 'write', command =self.canvas_detect, height=2, width=15, font=self.customFont).grid(row = 2, column = 2, padx = 5, pady = 5)
        #command Listbox
        Label(self.frame_content5, text = 'Edit Command From Here',font=self.myfontnew, bg="white", justify=LEFT).grid(row = 0, column = 0)
        TextCommandBox=Text(self.frame_content5, height=5, width=30)
        TextCommandBox.grid(row=1, column=0, padx=5, pady=5)
        self.output=Text(self.frame_content5,bg="black", fg="white", font=self.myfont, height=20, width=42)
        self.output.grid(row = 0, column = 1, padx=50, pady=5, rowspan=3)
        btnsubmit=Button(self.frame_content5, width=15, height=2, text="Get Result", command=self.mycallback)
        btnsubmit.grid(row=2, column=0)
        btnclear=Button(self.frame_content5, width=15, height=2, text="Clear Output", command=self.clearoutput)
        btnclear.grid(row=3, column=0)
        #end
        self.C1 = Checkbutton(self.frame_content, text = "-x", \
                 onvalue = "-x", offvalue ="", height=1, \
                 width = 7, bg="white", font=self.customFont, variable=self.var1)
        self.C1.grid(row = 2, column = 0, padx = 5, pady = 5)
        self.t1=Text(self.frame_content,height=1,width = 20)
        self.t1.grid(row = 2, column = 1, padx = 5, pady = 5)
        l1=Label(self.frame_content, text = ': maximum number of packets per second (optional)',font=self.myfont, bg="white", justify=LEFT).grid(row = 2, column = 2, padx = 5, pady = 5)
        
#.........这里部分代码省略.........
开发者ID:AsmitaKatyayni,项目名称:Airvengers,代码行数:103,代码来源:Airtun-ng.py

示例7: show_sell_bills

# 需要导入模块: from ttk import Notebook [as 别名]
# 或者: from ttk.Notebook import pack [as 别名]
    def show_sell_bills(master):
        """Заполняет верхний фрейм продаж блокнотом со счетами и
        сответствующими элементами управления."""

        sellTopFrame = Frame(master, relief=GROOVE)
        sellTopFrame.pack(side=TOP, fill=X, padx=10, pady=5)

        #------------------------------------------------------------
        def b_add():
            """Срабатывает при нажатии кнопки "Добавить счет", добавляет таб в
            блокноте со счетами"""

            bill = Bill(note)
            bills.append(bill)
            tab = bill.frame
            note.add(tab, text = show_sell_bills.entry.get())
            button_del_bill.configure(state=NORMAL)

        button_add_bill = Button(sellTopFrame,text=u'Добавить\nсчет',
                        style='Little.TButton', command=b_add)
        button_add_bill.pack(side=LEFT, padx=10, pady=10, fill=X)

        #------------------------------------------------------------
        """Хоть и без отдельной функции, но комментарий расширенный стоит дать.
        Это окошко ввода названия для создаваемого счета"""

        show_sell_bills.entry = StringVar()
        show_sell_bills.entry.set(u'Стол ')
        entry = Entry(sellTopFrame, textvariable=show_sell_bills.entry,
                        font=('verdana', FONT_SIZE))
        entry.pack(side=LEFT, padx=10, pady=10)

        #------------------------------------------------------------
        def b_left():
            """Срабатывает при нажатии кнопки "влево", сдвигается влево на
            один таб в блокноте со счетами"""

            w_name = note.select()
            window_names = note.tabs()
            if window_names:
                index = window_names.index(w_name) - 1
                note.select(window_names[index])

        button_left = Button(sellTopFrame, image=data.IMG_INTERFACE[3],
                                command=b_left)
        button_left.pack(side=LEFT, padx=5, pady=5)

        #------------------------------------------------------------
        def b_right():
            """Срабатывает при нажатии кнопки "вправо", сдвигается вправо на
            один таб в блокноте со счетами"""

            w_name = note.select()
            window_names = note.tabs()
            if window_names:
                index = window_names.index(w_name) + 1
                if index == len(window_names):
                    index = 0
                note.select(window_names[index])

        button_right = Button(sellTopFrame, image=data.IMG_INTERFACE[4],
                                command=b_right)
        button_right.pack(side=LEFT, padx=5, pady=5)

        #------------------------------------------------------------
        def b_del():
            """Срабатывает при нажатии кнопки "удалить счет", удаляет таб в
            блокноте со счетами"""

            w_name = note.select()
            window_names = note.tabs()
            if not window_names:
                button_del_bill.configure(state=DISABLED)
            else:
                index = window_names.index(w_name)
                if not bills[index].bill:
                    note.forget(note.select())
                    del(bills[index])
                    if not note.tabs():
                        button_del_bill.configure(state=DISABLED)
                else:
                    if tkMessageBox.askokcancel('Внимание!',
                                   'Вы уверены, что хотите удалить этот счет?'):
                        note.forget(note.select())
                        del(bills[index])
                        if not note.tabs():
                            button_del_bill.configure(state=DISABLED)

        button_del_bill = Button(sellTopFrame,text=u'Удалить\nсчет',
                        style='Little.TButton', command=b_del)
        button_del_bill.pack(side=LEFT, padx=10, pady=10, fill=X)


        #----- ОСТАВШИЕСЯ ЭЛЕМЕНТЫ - БЛОКНОТ, СЧЕТЧИК ПРОДАЖ, КАЛЬКУЛЯТОР ------

        label = Label(sellTopFrame, text='', bg='white',
                                            font=('Lucida Console', FONT_SIZE))
        label.pack(side=RIGHT, padx=10, pady=5)

        def label_renew():
#.........这里部分代码省略.........
开发者ID:sychov,项目名称:conditer,代码行数:103,代码来源:sell.py

示例8: report_cash

# 需要导入模块: from ttk import Notebook [as 别名]
# 或者: from ttk.Notebook import pack [as 别名]
def report_cash(master, from_date=None, to_date=None, reason=None):
    """Создает и выводи на экран окно с отчетом по блокноту расходов"""


    def press(index):
        """функция, срабатывающая при нажатии кнопок переключения
        между видами сортировок. Переключает вкладки в блокноте"""

        window_names = tabs.tabs()
        tabs.select(window_names[index])


    def make_query_cash(from_date=None, to_date=None, reason=None):
        """Возвращает кортеж запросов для последующего использования при
        составлении отчета по расходам"""

        select = queries.report_cash_query()

        if reason:
            for q in range(len(select)):
                new_select = []
                for element in select[q]:
                    if element.reason == reason:
                        new_select.append(element)
                select[q] = new_select

        if from_date and to_date:
            for q in range(len(select)):
                new_select = []
                for element in select[q]:
                    if (element.date_time >= from_date) and \
                       (element.date_time <= to_date + timedelta(days=1)):
                        new_select.append(element)
                select[q] = new_select

        elif from_date:
            for q in range(len(select)):
                new_select = []
                for element in select[q]:
                    if element.date_time >= from_date:
                        new_select.append(element)
                select[q] = new_select

        elif to_date:
            for q in range(len(select)):
                new_select = []
                for element in select[q]:
                    if element.date_time <= to_date + timedelta(days=1):
                        new_select.append(element)
                select[q] = new_select

        return select


    def show(frame, iterator):
        """Выводит на экран выборку, заданную в iterator"""

        scrollbar = Scrollbar(frame)
        tree = Treeview(frame, selectmode='none', padding=3,
                                    style='Custom.Treeview', height=REPORT_HEIGHT,
                                    yscrollcommand=scrollbar.set)
        tree.pack(side=LEFT, fill=BOTH, expand=YES)
        scrollbar.config(command=tree.yview)
        scrollbar.pack(side=LEFT, fill=Y)

        tree.tag_configure('1', font=('Verdana', FONT_SIZE_REPORT))
        tree.tag_configure('2', font=('Verdana', FONT_SIZE_REPORT),
                                                           background='#f5f5ff')

        Style().configure('Custom.Treeview', rowheight=FONT_SIZE_REPORT*2)

        columns = ['#' + str(x + 1) for x in range(5)]
        tree.configure(columns=columns)

        for q in range(len(header)):
            tree.heading('#%d' % (q + 1), text=header[q], anchor='w')
            tree.column('#%d' % (q + 1), width=REPORT_SCALE * col_width[q + 1],
                                                                     anchor='w')
        tree.heading('#0', text='', anchor='w')
        tree.column('#0', width=0, anchor='w', minwidth=0)

        flag = True
        for item in iterator:
            col = []
            col.append(add_s(item.reason.text))
            col.append(add_s(item.summ))
            col.append(add_s(item.comment))
            col.append(add_s(item.date_time.strftime('%d.%m.%Y')))
            col.append(add_s(item.date_time.time())[:8])

            flag = not flag
            if flag:
                tree.insert('', 'end', text='', values=col, tag='2')
            else:
                tree.insert('', 'end', text='', values=col, tag='1')

    # --------------------------------------------#

    tl = Toplevel(master)
    tl.title(u'Отчет по расходам')
#.........这里部分代码省略.........
开发者ID:sychov,项目名称:conditer,代码行数:103,代码来源:report_make.py

示例9: __init__

# 需要导入模块: from ttk import Notebook [as 别名]
# 或者: from ttk.Notebook import pack [as 别名]
    def __init__(self, master):
        
	self.fname=""
        #global variables
        self.t1=StringVar()
        self.t2=StringVar()
        self.t3=StringVar()
        self.t4=StringVar()
        self.t5=StringVar()
        self.t6=StringVar()
        self.t7=StringVar()
        self.t8=StringVar()
        
        self.var1=StringVar()
        self.var2=StringVar()
        self.var3=StringVar()
        self.var4=StringVar()
        self.var5=StringVar()
        self.var6=StringVar()
        self.var7=StringVar()
        self.var8=StringVar()
        #end
        
        mymaster = Frame(master, name='mymaster') # create Frame in "root"
        mymaster.pack(fill=BOTH)
        #min and max size of window    
        #master.minsize(width=900, height=900)
        #master.maxsize(width=870, height=420)
        #end
        
        #title of window
        master.title("Airolib-ng")
        #end
        
        #for the style of fonts
        self.customFont = tkFont.Font(family="Helvetica", size=12)
        self.myfont = tkFont.Font(family="Helvetica", size=10)
        self.myfont2 = tkFont.Font(family="Helvetica", size=8)
        self.headerfont=tkFont.Font(family="Helvetica", size=15,underline = True)
        self.myfontnew=tkFont.Font(family="Helvetica", size=11,underline = True)
        #end
        
        
       
        nb = Notebook(mymaster, name='nb') # create Notebook in "master"
        nb.pack(fill=BOTH, padx=2, pady=3) # fill "master" but pad sides
        #content frame
        self.frame_content = Frame(nb,name="frame_content", bg="white")
        self.frame_content.pack(fill=BOTH, side=TOP, expand=True)
        nb.add(self.frame_content, text="Filter-1") # add tab to Notebook
    
        # repeat for each tab
        self.frame_content7 = Frame(nb, name='frame_content7', bg="white")
        nb.add(self.frame_content7, text="Detect Devices")
        self.frame_content5 = Frame(nb, name='frame_content5', bg="white")
        nb.add(self.frame_content5, text="output")
        
        #End
        
	#frame content 7
	Label(self.frame_content7, text = 'Airolib-ng',font=self.headerfont, bg="white", padx=10, pady=10).grid(row = 0, column = 0)
        btndetect=Button(self.frame_content7, text = 'Detect', command =self.canvas_detect, height=2, width=15, font=self.customFont).grid(row = 1, column = 0, padx = 5, pady = 5)
		
	btndbrowse=Button(self.frame_content7, text = 'Attach File', command =self.browse_file, height=2, width=15, font=self.customFont).grid(row = 3, column = 0, padx = 5, pady = 5)	
	self.lilnew1=Listbox(self.frame_content7,bg="black", fg="white", font=self.myfont, selectmode=SINGLE, width=30, height=15)
        self.lilnew1.grid(row = 1, column = 1, rowspan=3)
	#End
	
        Label(self.frame_content, text = 'Airolib-ng',font=self.headerfont, bg="white", padx=10, pady=10).grid(row = 0, column = 0)
        Label(self.frame_content, text = 'Options :',font=self.myfontnew, bg="white").grid(row = 1, column = 1)
        #Button(self.frame_content, text = 'ivs', command =self.canvas_detect, height=2, width=15, font=self.customFont).grid(row = 2, column = 0, padx = 5, pady = 5)
        #Button(self.frame_content, text = 'gpsd', command =self.canvas_detect, height=2, width=15, font=self.customFont).grid(row = 2, column = 1, padx = 5, pady = 5)
        #Button(self.frame_content, text = 'write', command =self.canvas_detect, height=2, width=15, font=self.customFont).grid(row = 2, column = 2, padx = 5, pady = 5)
        #command Listbox
        Label(self.frame_content5, text = 'Edit Command From Here',font=self.myfontnew, bg="white", justify=LEFT).grid(row = 0, column = 0)
        TextCommandBox=Text(self.frame_content5, height=5, width=30)
        TextCommandBox.grid(row=1, column=0, padx=5, pady=5)
        self.output=Text(self.frame_content5,bg="black", fg="white", font=self.myfont, height=20, width=42)
        self.output.grid(row = 0, column = 1, padx=50, pady=5, rowspan=3)
        btnsubmit=Button(self.frame_content5, width=15, height=2, text="Get Result", command=self.mycallback)
        btnsubmit.grid(row=2, column=0)
        btnclear=Button(self.frame_content5, width=15, height=2, text="Clear Output", command=self.clearoutput)
        btnclear.grid(row=3, column=0)
        #end
        self.C1 = Checkbutton(self.frame_content, text = "--stats", \
                 onvalue = "--stats", offvalue = "", height=1, \
                 width = 7, bg="white", font=self.customFont,variable=self.var1)
        self.C1.grid(row = 2, column = 0, padx = 5, pady = 5)
        self.t1=Text(self.frame_content,height=1,width = 20)
        self.t1.grid(row = 2, column = 1, padx = 5, pady = 5)
        l1=Label(self.frame_content, text = ': Output some information about the database.',font=self.myfont, bg="white", justify=LEFT).grid(row = 2, column = 2, padx = 5, pady = 5)
        
        self.C2 = Checkbutton(self.frame_content, text = "--sql", \
                 onvalue = "--sql", offvalue = "", height=1, \
                 width = 7, bg="white", font=self.customFont,variable=self.var2)
        self.C2.grid(row = 3, column = 0, padx = 5, pady = 5)
        self.t2=Text(self.frame_content,height=1,width = 20)
        self.t2.grid(row = 3, column = 1, padx = 5, pady = 5)
        l2=Label(self.frame_content, text = ': Execute the specified SQL statement.',font=self.myfont, bg="white", justify=LEFT).grid(row = 3, column = 2, padx = 5, pady = 5)
        
#.........这里部分代码省略.........
开发者ID:AsmitaKatyayni,项目名称:Airvengers,代码行数:103,代码来源:Airolib-ng.py

示例10: show_main_frame

# 需要导入模块: from ttk import Notebook [as 别名]
# 或者: from ttk.Notebook import pack [as 别名]
    def show_main_frame(root):
        """Создаем основное окно программы"""

        #------------------------------------------------------------
        def press(button):
            """функция, срабатывающая при нажатии кнопок переключения
            между правыми (основными) фреймами"""

            index = BUTTONS.index(button)
            window_names = rightFrameTabs.tabs()
            rightFrameTabs.select(window_names[index])

        #--------------------------------------------------------------
        def tab_changes(tab):
            """функция, срабатывающая при нажатии закладок переключения
            между правыми (основными) фреймами"""

            window_names = rightFrameTabs.tabs()
            index = window_names.index(rightFrameTabs.select())
            button = BUTTONS[index]

            for but in BUTTONS:
                if but <> button:
                    but['style'] = 'Default.TButton'
                else:
                    but['style'] = 'Chosen.TButton'

            if button == button_rule:
                if not checks_exist('Остались незакрытые счета!\nВы уверены, ' +
                   ' что хотите перейти в раздел "Управление"?\nвсе незакрытые'+
                   ' счета в таком случае будут для вас потеряны!'):
                    press(button_sell)

            if not FLAGS[index]:
                SHOW[index](workArea[index],data)
                FLAGS[index] = True

        #-------------------------------------------------------------

        leftFrame = Canvas(root, width=PANEL_WIDTH, highlightthickness=0)
        leftFrame.pack(side=LEFT, fill=Y)
        leftFrame.pack_propagate(False)
        if USE_BACKGROUND:
            leftFrame.create_image(0,0, anchor='nw', image=data.photo)

        heads = (u'Продажи', u'Отчеты', u'Приход', u'Списание', u'Сверка',
                 u'Управление', u'Настройки',)

        workArea = []
        rightFrameTabs = Notebook(root, style='Hidden.TNotebook')
        for q in range (7):
            frame = Canvas(rightFrameTabs, relief=GROOVE)
            rightFrameTabs.add(frame, text=heads[q])
            workArea.append(frame)
        rightFrameTabs.pack(side=TOP, fill=BOTH, expand=YES)
        rightFrameTabs.bind('<<NotebookTabChanged>>', tab_changes)

        button_sell = Button(leftFrame, text = u'\nПРОДАЖИ\n',
                             command=lambda: press(button_sell))
        button_sell.pack(side=TOP, padx=10, pady=10, fill=X)
        button_comings = Button(leftFrame, text = u'\nПРИХОД\n',
                                command=lambda: press(button_comings))
        button_comings.pack(side=TOP, padx=10, pady=10, fill=X)
        button_lost = Button(leftFrame, text = u'\nСПИСАНИЕ\n',
                             command=lambda: press(button_lost))
        button_lost.pack(side=TOP, padx=10, pady=10, fill=X)
        button_inventory = Button(leftFrame, text = u'\nСВЕРКА\n',
                                  command=lambda: press(button_inventory))
        button_inventory.pack(side=TOP, padx=10, pady=10, fill=X)
        button_reports = Button(leftFrame, text = u'\nОТЧЕТЫ\n',
                         command=lambda: press(button_reports))
        button_reports.pack(side=TOP, padx=10, pady=10, fill=X)
        button_rule = Button(leftFrame, text = u'\nУПРАВЛЕНИЕ\n',
                             command=lambda: press(button_rule))
        button_rule.pack(side=TOP, padx=10, pady=10, fill=X)
        button_exit = Button(leftFrame, text = u'\nВЫХОД\n', command=shutdown,
                                style='Default.TButton')
        button_exit.pack(side=BOTTOM, padx=10, pady=10, fill=X)
        button_options = Button(leftFrame, text = u'\nНАСТРОЙКА\n',
                             command=lambda: press(button_options))
        button_options.pack(side=BOTTOM, padx=10, pady=10, fill=X)

        BUTTONS = (button_sell, button_reports, button_comings,
                     button_lost, button_inventory, button_rule, button_options)
        SHOW = (show_sell, show_report, show_incoming, show_lost, show_verify,
                        show_control, show_options)
        FLAGS = [True, False, False, False, False, False, True]
        styles()
        press(button_sell)

        return workArea
开发者ID:sychov,项目名称:conditer,代码行数:93,代码来源:gui.py

示例11: Arrendatarios

# 需要导入模块: from ttk import Notebook [as 别名]
# 或者: from ttk.Notebook import pack [as 别名]
class Arrendatarios(Frame):
        def __init__(self, parent, controller):
                Frame.__init__(self, parent)
                
                #VARIABLES GLOBALES
                global cedula, titulo, residencia, nombres, apellidos, direccion, telefono, envio, correo, celular, dia, mes, profesion, empresa, oficina, tel, telfax, banco, tcuenta, numcuenta, tipopersona, retefuente, reteiva, gcontribuyente, gfactura, gcheque, notas, co1cc, co1nombres, co1dir, co1tel1, co1cargo, co1empresa, co1oficina, co1tel2, co2cc, co2nombres, co2dir, co2tel1, co2cargo, co2empresa, co2oficina, co2tel2, co3cc, co3nombres, co3dir, co3tel1, co3cargo, co3empresa, co3oficina, co3tel2, lb, note, busqueda, dato, E
                
                #INSTANCIEAS DE LOS WIDGETS
                global codeE, refE, cityE, nameE, lastnameE, adressE, phoneE, mailE, emailE, mobileE, birthdayE, birthdayCbx, ocupationE, companyE, ofiE, officetelE, faxE, bankCbx, banktypeCbx, numbankE, personR1, personR2, Ch1, Ch2, Ch3, Ch4, Ch5, note, cc1E, name1E, adress1E, phone1E, job1E, jobphone1E, office1E, officetel1E, cc2E, name2E, adress2E, phone2E, job2E, jobphone2E, office2E, officetel2E, cc3E, name3E, adress3E, phone3E, job3E, jobphone3E, office3E, officetel3E, add, update, delete, clean, cancel
                global info, _arrendatarios

                _arrendatarios = dict()
                
                #Variables
                cedula = StringVar()
                titulo = StringVar()
                residencia = StringVar()
                nombres = StringVar()
                apellidos = StringVar()
                direccion = StringVar()
                telefono = StringVar()
                envio = StringVar()
                correo = StringVar()
                celular = StringVar()
                dia = IntVar()
                mes = StringVar()
                meses = ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto","Septiembre", "Octubre", "Noviembre", "Diciembre"]
                profesion = StringVar()
                empresa = StringVar()
                oficina = StringVar()
                tel = StringVar()
                telfax = StringVar()
                banco = StringVar()
                bancos = ['Bancolombia', "Banco Bogotá", "Banco Agrario", "Banco Occidente"]
                banktype = ['Corriente','Ahorro']
                tcuenta = StringVar()
                numcuenta = StringVar()
                tipopersona = IntVar()  
                retefuente = IntVar()
                reteiva = IntVar()
                gcontribuyente = IntVar()
                gfactura = IntVar()
                gcheque = IntVar()
                notas = StringVar()
                
                #----------------------------
                
                co1cc = StringVar()
                co1nombres = StringVar()
                co1dir = StringVar()
                co1tel1 = StringVar()
                co1cargo = StringVar()
                co1empresa = StringVar()
                co1oficina = StringVar()
                co1tel2 = StringVar()
                
                co2cc = StringVar()
                co2nombres = StringVar()
                co2dir = StringVar()
                co2tel1 = StringVar()
                co2cargo = StringVar()
                co2empresa = StringVar()
                co2oficina = StringVar()
                co2tel2 = StringVar()
                
                co3cc = StringVar()
                co3nombres = StringVar()
                co3dir = StringVar()
                co3tel1 = StringVar()
                co3cargo = StringVar()
                co3empresa = StringVar()
                co3oficina = StringVar()
                co3tel2 = StringVar()
                
                #BUSQUEDA = ["Nombre","CC/Nit"]
                busqueda = StringVar()
                busqueda.trace("w", lambda name, index, mode: buscar())
                info = IntVar()
                dato = StringVar()

                #WIDGETS
                
                #========================= HEADER ===========================
                
                self.header = Label(self, text="GESTIÓN DE ARRENDATARIOS", font="bold")
                self.header.pack(pady=20, side=TOP)
                
                #========================= WRAPPER ===========================
                
                self.wrapper = Frame (self)
                self.wrapper.pack(side=LEFT, fill=Y)
                #Esto centro el wrapper
                #self.wrapper.pack(side=LEFT, fill=BOTH, expand=True)
                
                #================ NOTEBOOK =============>
                
                self.nb = Notebook(self.wrapper)
                
                #-----------------------> TAB 1
                
#.........这里部分代码省略.........
开发者ID:einnerlink,项目名称:sbienes,代码行数:103,代码来源:arrendatarios.py

示例12: __init__

# 需要导入模块: from ttk import Notebook [as 别名]
# 或者: from ttk.Notebook import pack [as 别名]
    def __init__(self, master):
        
	self.fname=""
        #global variables
        self.t1=StringVar()
        self.t2=StringVar()
        self.t3=StringVar()
        self.t4=StringVar()
        self.t5=StringVar()
        self.t6=StringVar()
        self.t7=StringVar()
        self.t8=StringVar()
        
        self.var1=StringVar()
        self.var2=StringVar()
        self.var3=StringVar()
        self.var4=StringVar()
        self.var5=StringVar()
        self.var6=StringVar()
        self.var7=StringVar()
        self.var8=StringVar()
       
        #end
        
        mymaster = Frame(master, name='mymaster') # create Frame in "root"
        mymaster.pack(fill=BOTH)
        #min and max size of window    
        #master.minsize(width=900, height=900)
        #master.maxsize(width=650, height=500)
        #end
        
        #title of window
        master.title("Airdecloak-ng")
        #end
        
        #for the style of fonts
        self.customFont = tkFont.Font(family="Helvetica", size=12)
        self.myfont = tkFont.Font(family="Helvetica", size=10)
        self.myfont2 = tkFont.Font(family="Helvetica", size=8)
        self.headerfont=tkFont.Font(family="Helvetica", size=15,underline = True)
        self.myfontnew=tkFont.Font(family="Helvetica", size=11,underline = True)
        #end
        
        
       
        nb = Notebook(mymaster, name='nb') # create Notebook in "master"
        nb.pack(fill=BOTH, padx=2, pady=3) # fill "master" but pad sides
        #content frame
        self.frame_content = Frame(nb,name="frame_content", bg="white")
        self.frame_content.pack(fill=BOTH, side=TOP, expand=True)
        nb.add(self.frame_content, text="Page1") # add tab to Notebook
    
        # repeat for each tab
        self.frame_content7 = Frame(nb, name='frame_content7', bg="white")
        nb.add(self.frame_content7, text="Detect Devices")
        self.frame_content5 = Frame(nb, name='frame_content5', bg="white")
        nb.add(self.frame_content5, text="output")
        
        #End
        
	#frame content 7
	Label(self.frame_content7, text = 'Airdecloak-ng',font=self.headerfont, bg="white", padx=10, pady=10).grid(row = 0, column = 0)
        btndetect=Button(self.frame_content7, text = 'Detect', command =self.canvas_detect, height=2, width=15, font=self.customFont).grid(row = 1, column = 0, padx = 5, pady = 5)
		
	btndbrowse=Button(self.frame_content7, text = 'Attach File', command =self.browse_file, height=2, width=15, font=self.customFont).grid(row = 3, column = 0, padx = 5, pady = 5)	
	self.lilnew1=Listbox(self.frame_content7,bg="black", fg="white", font=self.myfont, selectmode=SINGLE, width=30, height=15)
        self.lilnew1.grid(row = 1, column = 1, rowspan=3)
	#End

        Label(self.frame_content, text = 'Airdecloak-ng',font=self.headerfont, bg="white", padx=10, pady=10).grid(row = 0, column = 0)
        Label(self.frame_content, text = 'Options :',font=self.myfontnew, bg="white").grid(row = 1, column = 1)
        #Button(self.frame_content, text = 'ivs', command =self.canvas_detect, height=2, width=15, font=self.customFont).grid(row = 2, column = 0, padx = 5, pady = 5)
        #Button(self.frame_content, text = 'gpsd', command =self.canvas_detect, height=2, width=15, font=self.customFont).grid(row = 2, column = 1, padx = 5, pady = 5)
        #Button(self.frame_content, text = 'write', command =self.canvas_detect, height=2, width=15, font=self.customFont).grid(row = 2, column = 2, padx = 5, pady = 5)
        #command Listbox
        Label(self.frame_content5, text = 'Edit Command From Here',font=self.myfontnew, bg="white", justify=LEFT).grid(row = 0, column = 0)
        TextCommandBox=Text(self.frame_content5, height=5, width=30)
        TextCommandBox.grid(row=1, column=0, padx=5, pady=5)
        self.output=Text(self.frame_content5,bg="black", fg="white", font=self.myfont, height=20, width=42)
        self.output.grid(row = 0, column = 1, padx=50, pady=5, rowspan=3)
        btnsubmit=Button(self.frame_content5, width=15, height=2, text="Get Result", command=self.mycallback)
        btnsubmit.grid(row=2, column=0)
        btnclear=Button(self.frame_content5, width=15, height=2, text="Clear Output", command=self.clearoutput)
        btnclear.grid(row=3, column=0)
        #end
        self.C1 = Checkbutton(self.frame_content, text = "-i", \
                 onvalue = "-i", offvalue = "", height=1, \
                 width = 7, bg="white", font=self.customFont,variable=self.var1)
        self.C1.grid(row = 2, column = 0, padx = 5, pady = 5)
        self.t1=Text(self.frame_content,height=1,width = 20)
        self.t1.grid(row = 2, column = 1, padx = 5, pady = 5)
        l1=Label(self.frame_content, text = ': Input capture file',font=self.myfont, bg="white", justify=LEFT).grid(row = 2, column = 2, padx = 5, pady = 5)
        
        self.C2 = Checkbutton(self.frame_content, text = "--ssid", \
                 onvalue = "--ssid", offvalue = "", height=1, \
                 width = 7, bg="white", font=self.customFont,variable=self.var2)
        self.C2.grid(row = 3, column = 0, padx = 5, pady = 5)
        self.t2=Text(self.frame_content,height=1,width = 20)
        self.t2.grid(row = 3, column = 1, padx = 5, pady = 5)
        l2=Label(self.frame_content, text = ': ESSID of the network to filter',font=self.myfont, bg="white", justify=LEFT).grid(row = 3, column = 2, padx = 5, pady = 5)
#.........这里部分代码省略.........
开发者ID:AsmitaKatyayni,项目名称:Airvengers,代码行数:103,代码来源:Airdecloak-ng.py

示例13: Contratos

# 需要导入模块: from ttk import Notebook [as 别名]
# 或者: from ttk.Notebook import pack [as 别名]
class Contratos(Frame):
        def __init__(self, parent, controller):
                        Frame.__init__(self, parent)
                        
                        #VARIABLES GLOBALES
                        global cod, cc, inquilino, codinm, inmueble, nit, owner, rel, vlrenta, duracion 
                        global contratos, tcontrato, incremento, gfacturaIni, facturaSgte, fecha, hoy 
                        global notas, anexos, destinacion, servicios, conexos, tercero, nombret, fecha
                        global aplicado, cc_aplicado, n_aplicado, inm_aplicado, novedad, n_nombre, n_valor
                        global h, busqueda, clean, update, add
                        
                        #INSTANCIEAS DE LOS WIDGETS
                        global e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, Cbx1, chkb1, chkb2, lb, cedulaE, notas
                        
                        fecha = datetime.date.today()
                        hoy = "%s" %fecha #ESTE NUESTRA LA FECHA EN FORMATO AÑO-MES-DIA (YYYY/MM/DD)
                        #hoy = time.strftime("%d/%m/%y") #ESTO PARA VER FORMATO FECHA EN DIA/MES/AÑO
                        #hoy = time.strftime("%y/%m/%d")
                        h = hoy
                        
                        #VARIABLES
                        lupa = PhotoImage(file='img/lupa.png')
                        schedule = PhotoImage(file='img/calendar.gif')
                        
                        cod = IntVar()
                        cc = StringVar()
                        inquilino = StringVar()
                        codinm = IntVar()
                        inmueble = StringVar()
                        nit = StringVar()
                        owner = StringVar()
                        rel = IntVar()
                        
                        vlrenta = DoubleVar()
                        duracion = IntVar()
                        contratos = ['Vivienda', 'Comercial', 'Mixta']
                        tcontrato = StringVar()
                        incremento = DoubleVar()
                        gfacturaIni = IntVar()
                        facturaSgte = IntVar()
                        fecha = StringVar()
                        
                        notas = StringVar()
                        anexos = StringVar()
                        destinacion = StringVar()
                        servicios = StringVar()
                        conexos = StringVar()
                        
                        tercero = StringVar()
                        nombret = StringVar()
                        
                        aplicado = IntVar()
                        cc_aplicado = StringVar()
                        n_aplicado = StringVar()
                        inm_aplicado = StringVar()
                        novedad = StringVar()
                        n_nombre = StringVar()
                        n_valor = DoubleVar()
                        
                        #BUSQUEDA = ["Nombre","CC/Nit"]
                        busqueda = StringVar()
                        busqueda.trace("w", lambda name, index, mode: buscar())
                        dato = StringVar()
                        
                        #WIDGETS
                        
                        #========================= HEADER ===========================
                        
                        self.header = Label(self, text="CONTRATOS", font="bold")
                        self.header.pack(pady=20, side=TOP)
                        
                        #========================== WRAPPER ==========================
                        
                        self.wrapper = Frame (self)
                        self.wrapper.pack(side=LEFT, fill=Y)
                        
                        #================ NOTEBOOK =============>
                        
                        self.nb = Notebook(self.wrapper)
                        
                        #-----------------------> TAB 1
                        
                        self.tab1 = Frame (self.nb)
                        
                        self.f0 = Frame(self.tab1)#-------------------------------------
                        self.f0.pack(pady=5,fill=X)
                        
                        l1 = Label(self.f0, text='Código:')
                        l1.pack(side=LEFT)
                        
                        e1 = Entry(self.f0, textvariable=cod, width=10)
                        e1.pack(side=LEFT)
                        
                        self.f1 = Frame(self.tab1)#-------------------------------------
                        self.f1.pack(pady=5,fill=X)
                        
                        l2 = Label(self.f1, text='Arrendatario:')
                        l2.pack(side=LEFT, fill=X)
                        
                        e2 = Entry(self.f1, textvariable=cc, width=15)
#.........这里部分代码省略.........
开发者ID:einnerlink,项目名称:sbienes,代码行数:103,代码来源:contratos.py

示例14: easy_Access_GUI

# 需要导入模块: from ttk import Notebook [as 别名]
# 或者: from ttk.Notebook import pack [as 别名]

#.........这里部分代码省略.........
        self.SNMPScrolledTextFrame = LabelFrame ( self.snmpTab , text = "SNMP Output", padx = 10, pady = 10)
        
        #####SNMPInterfaceFrame
        self.SNMPIFCMVal = StringVar()
        self.SNMPIFCMVal.set("MTA")
        self.SNMPIFCM_Radiobutton = Radiobutton(self.SNMPInterfaceFrame, text = "CM", variable = self.SNMPIFCMVal, value = "CM")
        self.SNMPIFMTA_Radiobutton = Radiobutton(self.SNMPInterfaceFrame, text = "MTA", variable = self.SNMPIFCMVal, value = "MTA")
        self.SNMPIFCM_entry = Entry ( self.SNMPInterfaceFrame)
        self.SNMPIFMTA_entry= Entry ( self.SNMPInterfaceFrame)
        
        #####SNMPFuntionFrame
        self.snmpFuncVal = StringVar()
        self.snmpFuncVal.set("snmpwalk")
        self.SNMPgetradio = Radiobutton ( self.SNMPFuntionFrame, text = 'SNMPSET', variable = self.snmpFuncVal, value = "snmpset")
        self.SNMPwalkradio = Radiobutton ( self.SNMPFuntionFrame, text = "SNMPWALK", variable = self.snmpFuncVal, value = "snmpwalk")
        
        #####SNMPCommunityStringFrame
        self.SNMPCSentryState = ['disabled','disabled', 'normal']
        self.snmpCSVal = IntVar()

        self.snmpCSVal.set(1)
        self.SNMPCSCustomEntry = Entry ( self.SNMPCommunityStringFrame, state = self.SNMPCSentryState[self.snmpCSVal.get()])
        self.SNMPCSPublic = Radiobutton ( self.SNMPCommunityStringFrame, text = 'PUBLIC', variable = self.snmpCSVal, value = 0, command = lambda:self.changedSNMPCS())
        self.SNMPCSPrivate = Radiobutton ( self.SNMPCommunityStringFrame, text = "PRIVATE", variable = self.snmpCSVal, value = 1, command = lambda:self.changedSNMPCS())
        self.SNMPCSCustom = Radiobutton ( self.SNMPCommunityStringFrame, text = "CUSTOM", variable = self.snmpCSVal, value = 2, command = lambda:self.changedSNMPCS())
        self.SNMPCSCustomEntry = Entry ( self.SNMPCommunityStringFrame, state = self.SNMPCSentryState[self.snmpCSVal.get()])
        #self.snmpCSVal.trace("w", self.changedSNMPCS())
        print  self.SNMPCSentryState[self.snmpCSVal.get()]
        
        ####SNMPScrolledText
        self.resultFromSNMP_text = ScrolledText ( self.SNMPScrolledTextFrame)
                
        
        self.content.pack() 
        self.tabbedFrame.pack()
        self.tabbed.pack()
        self.statusFrame.pack()
        
        self.CMTSMacaddrFrame.pack(fill = 'x', ipady = 5)
        self.CMTSConfigureFrame.pack( fill = 'x', ipady = 5)
        self.CMTSSubmitFrame.pack(fill = 'x')
        self.CMTSScrolledTextFrame.pack(fill = 'x')
        self.SNMPInterfaceFrame.pack(fill = 'x')
        self.SNMPFuntionFrame.pack(fill = 'x')
        self.SNMPCommunityStringFrame.pack( fill = 'x')
        self.SNMPScrolledTextFrame.pack( fill = 'x')
        
        self.connCMTS1_Stat.pack(side = LEFT )
        self.connCMTS1_Label.pack(side = LEFT)
        self.connCMTS2_Stat.pack(side = LEFT )
        self.connCMTS2_Label.pack(side = LEFT)
        self.connSNMP_Stat.pack(side = LEFT)
        self.connSNMP_Label.pack(side = LEFT)
        
        self.macAddr_entry.pack()
        self.cmtsTabSubmit.pack(ipadx = 30)
        self.resultFromCMTS_text.pack(fill = 'x', anchor = S )
        self.CMTS1Radio.pack(side = LEFT, padx = 30)
        self.CMTS2Radio.pack(side = LEFT, padx = 30)
        self.CMTSConfigureButton.pack(side=LEFT, padx = 30)
        
         
        self.SNMPIFCM_Radiobutton.pack( side = LEFT)
        self.SNMPIFCM_entry.pack( side = LEFT)
        self.SNMPIFMTA_Radiobutton.pack(side = LEFT)
        self.SNMPIFMTA_entry.pack(side = LEFT)
开发者ID:drajeshmail,项目名称:easy_Access,代码行数:70,代码来源:easy_Access.py

示例15: __init__

# 需要导入模块: from ttk import Notebook [as 别名]
# 或者: from ttk.Notebook import pack [as 别名]
    def __init__(self, master):
        
	self.fname="" 
        #global variables
        self.t1=StringVar()
        self.t2=StringVar()
        self.t3=StringVar()
        self.t4=StringVar()
        self.t5=StringVar()
        self.t6=StringVar()
        self.t7=StringVar()
        self.t8=StringVar()
        self.t9=StringVar()
        self.t10=StringVar()
        self.t11=StringVar()
        self.t12=StringVar()
        self.t13=StringVar()
        self.t14=StringVar()
        self.t15=StringVar()
        self.t16=StringVar()
        self.t17=StringVar()
        self.t18=StringVar()
        self.t19=StringVar()
        self.t20=StringVar()
        self.t21=StringVar()
        self.t22=StringVar()
        self.t23=StringVar()
        self.t24=StringVar()
        self.t25=StringVar()
        self.t26=StringVar()
        self.t27=StringVar()
        self.t28=StringVar()
        self.t29=StringVar()
        self.t30=StringVar()
        self.t31=StringVar()
        self.t32=StringVar()
        self.t33=StringVar()
        self.t34=StringVar()
        
        self.var1=StringVar()
        self.var2=StringVar()
        self.var3=StringVar()
        self.var4=StringVar()
        self.var5=StringVar()
        self.var6=StringVar()
        self.var7=StringVar()
        self.var8=StringVar()
        self.var9=StringVar()
        self.var10=StringVar()
        self.var11=StringVar()
        self.var12=StringVar()
        self.var13=StringVar()
        self.var14=StringVar()
        self.var15=StringVar()
        self.var16=StringVar()
        self.var17=StringVar()
        self.var18=StringVar()
        self.var19=StringVar()
        self.var20=StringVar()
        self.var21=StringVar()
        self.var22=StringVar()
        self.var23=StringVar()
        self.var24=StringVar()
        self.var25=StringVar()
        self.var26=StringVar()
        self.var27=StringVar()
        self.var28=StringVar()
        self.var29=StringVar()
        self.var30=StringVar()
        self.var31=StringVar()
        self.var32=StringVar()
        self.var33=StringVar()
        self.var34=StringVar()
        #end
        
        mymaster = Frame(master, name='mymaster') # create Frame in "root"
        mymaster.pack(fill=BOTH)
        #min and max size of window    
        #master.minsize(width=900, height=900)
        #master.maxsize(width=750, height=470)
        #end
        
        #title of window
        master.title("Aircrack-ng")
        #end
        
        #for the style of fonts
        self.customFont = tkFont.Font(family="Helvetica", size=12)
        self.myfont = tkFont.Font(family="Helvetica", size=10)
        self.myfont2 = tkFont.Font(family="Helvetica", size=8)
        self.headerfont=tkFont.Font(family="Helvetica", size=15,underline = True)
        self.myfontnew=tkFont.Font(family="Helvetica", size=11,underline = True)
        #end
        
        
       
        nb = Notebook(mymaster, name='nb') # create Notebook in "master"
        nb.pack(fill=BOTH, padx=2, pady=3) # fill "master" but pad sides
        #content frame
        self.frame_content = Frame(nb,name="frame_content", bg="white")
#.........这里部分代码省略.........
开发者ID:AsmitaKatyayni,项目名称:Airvengers,代码行数:103,代码来源:Aircrack-ng.py


注:本文中的ttk.Notebook.pack方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。