def SQLQueriesExecution(queryString, informationData): printData = [] dataWindow = Window(app, title="Query Display", layout="grid") dataWindow.height = 1080 dataWindow.width = 400 dataWindow.bg = "Grey" dataRecord = connection.execute(queryString) printData.append(informationData) for row in dataRecord: printData.append(row) dataList = ListBox(dataWindow, items=printData, scrollbar=True, grid=[0, 0], align="top") dataList.height = 1080 dataList.width = 400 dataList.bg = "White"
window = Window(app, title = "Edit Today's List", height=500, width=950, layout="grid") window.hide() lspacer = Box(window, grid=[0,0], width=20, height=500) left_box = Box(window, grid=[1,0]) mspacer = Box(window, grid=[2,0], width=40, height=500) right_box = Box(window, grid=[3,0]) rspacer = Box(window, grid=[4,0], width=20, height=500) # LeftBox listBoxTitle = Text(left_box, "All Work Orders", grid=[0,0], size=16, color="Dark Blue",\ font="Quicksand Medium") instructions = Text(left_box, "click to add boat to Today's List", grid=[0,1], color="Dark Blue") fullList = ListBox(left_box, items = boatlist, command = write_wo, width = 500, height = 345, grid=[0,2],\ scrollbar=True) fullList.bg = (200, 230, 255) fullList.text_size = 16 fullList.tk.children["!scrollbar"].config(width=25) # access the tkinter object to resize the scrollbar fullList._listbox.resize(None, None) # to show scrollbar, reset internal listbox size fullList._listbox.resize("fill", "fill") # now fill available space # Missing Name Button infobutton = PushButton(left_box, text = "Missing Name?", padx=5, command = info_button, align="bottom", grid=[0,3]) infobutton.text_color = "Dark Blue" infobutton.text_size = 14 infobutton.bg = (110, 170, 255) # RightBox todaysList = Text(right_box, text="Today's List", size=16, color="Dark Blue", font="Quicksand Medium") listInstruct = Text(right_box, text="click to remove boat from Today's List", color="Dark Blue") display = ListBox(right_box, items = todays_boats, command = delete_name ,\
"""Left padding""" box = Box(app, grid=[0, 0], height='fill', width=15) """Left content""" # Get venv button get_venvs = PushButton(app, list_virtualenvs, text='Load virtualenvs', grid=[1, 1], width=20) get_venvs.text_size = 14 get_venvs.bg = btn_bg box = Box(app, grid=[1, 2], height=15, width='fill') # List box venv_list = ListBox(app, align='left', grid=[1, 3], height=400, width=250) venv_list.text_size = 14 venv_list.bg = 'white' box = Box(app, grid=[1, 4], height=15, width='fill') # Activate venv button activate = PushButton(app, activate_venv, text='Activate', grid=[1, 5], align='left') activate.text_size = 14 activate.bg = btn_bg activate.width = 8 # Delete venv button delete = PushButton(app, delete_venv, text='Delete', grid=[1, 5],