def create_stage_window(self, stage): stagelabel = GLabel(stage + "StageTitle", width=100, height=20, text=stage) stagerow = GFrame_Row(stage + "StageRow", [stagelabel], height=40, parms=[WIN, HIN, HC, VC, [0, 0, 0], [0, 0]]) stagerow.configure(background="black") # Create table widgets = [stagerow] weeks = current_delivery(self.job_recs, stage) for i, week in enumerate(weeks): tb = create_stage_table(i, week) widgets.append(tb) stage_window = HBox(stage + "MainBox", widgets) # Position Topwindow right of buttons x, y = self.ced_button.get_absolute_x_y() x += self.ced_button.width + 10 build_gui(None, stage_window, xpos=x) # stagerow.widget.configure(background='black') return stage_window
def create_stage_window(self, stage): stagelabel = GLabel(stage + 'StageTitle', width=100, height=20, text=stage) stagerow = GFrame_Row(stage + 'StageRow', [stagelabel], height=40, parms=[WIN, HIN, HC, VC, [0, 0, 0], [0, 0]]) stagerow.configure(background='black') # Create table widgets = [stagerow] weeks = current_delivery(self.job_recs, stage) for i, week in enumerate(weeks): tb = create_stage_table(i, week) widgets.append(tb) stage_window = HBox(stage + 'MainBox', widgets) # Position Topwindow right of buttons x, y = self.ced_button.get_absolute_x_y() x += self.ced_button.width + 10 build_gui(None, stage_window, xpos=x) #stagerow.widget.configure(background='black') return stage_window
from build import build_gui import tkinter as TK from sample_widgets import label1, label2, label3, label4, button1, button2, button3, exit_button def tick(): print (root.geometry()) root.after(500, tick) # Constantly loop through this code def resize_test(): # See what happens when the app width is changed and build called again con8.width += 40 build_gui(root, con8) con1 = GFrame_Row('Row1', [label1, label2], height = 40, parms=[WIN, HIN, HL, VC,[5,5,5], [0,0]]) con1.configure(background='lightblue') con2 = GFrame_Row('Row2', [label3, label4], height=40, parms=[WIN, HAS, HL, VC,[5,5,5], [0,0]]) con2.configure(background='lightgrey') #con3 = GFrame_Column('Column1', [con1, con2], parms=[WIN, HIN, HL, VC,[0,0,0], [0,0]]) con3 = HBox('Con3', [con1,con2]) con3.configure(background='grey') con4 = GFrame_Column('Column2', [button1, button2, button3], width=150, parms=[WIN, HIN, HC, VC,[0,0], [5,5,5]]) con4.configure(background='grey') #con5 = GFrame_Row('Row3', [con3, con4], parms=[WIN, HIN, HL, VC,[0,0,0], [0,0]]) con5 = VBox('Con5',[con3, con4]) con5.configure(background='lightgreen') con6 = GFrame_Row('Row4',[exit_button], height=40, parms=[WIN, HIN, HC, VC,[0,0,0], [0,0]]) con6.configure(background='green')
def tick(): print(root.geometry()) root.after(500, tick) # Constantly loop through this code def resize_test(): # See what happens when the app width is changed and build called again con8.width += 40 build_gui(root, con8) con1 = GFrame_Row('Row1', [label1, label2], height=40, parms=[WIN, HIN, HL, VC, [5, 5, 5], [0, 0]]) con1.configure(background='lightblue') con2 = GFrame_Row('Row2', [label3, label4], height=40, parms=[WIN, HAS, HL, VC, [5, 5, 5], [0, 0]]) con2.configure(background='lightgrey') #con3 = GFrame_Column('Column1', [con1, con2], parms=[WIN, HIN, HL, VC,[0,0,0], [0,0]]) con3 = HBox('Con3', [con1, con2]) con3.configure(background='grey') con4 = GFrame_Column('Column2', [button1, button2, button3], width=150, parms=[WIN, HIN, HC, VC, [0, 0], [5, 5, 5]]) con4.configure(background='grey') #con5 = GFrame_Row('Row3', [con3, con4], parms=[WIN, HIN, HL, VC,[0,0,0], [0,0]]) con5 = VBox('Con5', [con3, con4])