def StartOnePlayer(): global onePlayerWindow global drawButtonOnePlayer global cardImagesOnePlayer global guessContainerOnePlayer global guessCheckButtonOnePlayer global guessTextBoxOnePlayer global correctOnePlayer global errorTextOnePlayer onePlayerWindow = Window(app, title="One Player Game", layout="grid") onePlayerWindow.width = 320; onePlayerWindow.height = 560; onePlayerWindow.bg = "Lime" drawButtonOnePlayer = PushButton(onePlayerWindow, text="Draw!", grid=[0, 0], align="top", command=ButtonSwapOnePlayer) drawButtonOnePlayer.width = 20; drawButtonOnePlayer.height = 5; drawButtonOnePlayer.bg = "White" cardImagesOnePlayer = Box(onePlayerWindow, layout="grid", grid=[0, 1], align="top", border=True) cardImagesOnePlayer.set_border(10, "Lime") guessContainerOnePlayer = Box(onePlayerWindow, layout="grid", grid=[0, 2], align="top", border=True) guessContainerOnePlayer.set_border(10, "Lime") guessTextBoxOnePlayer = TextBox(guessContainerOnePlayer, grid=[0, 0], align="top") guessTextBoxOnePlayer.text_size = 20; guessTextBoxOnePlayer.bg = "White"; guessTextBoxOnePlayer.disable(); guessCheckButtonOnePlayer = PushButton(guessContainerOnePlayer, text="Check!", grid=[0, 1], align="top", command=CheckValuesOnePlayer) guessCheckButtonOnePlayer.width = 20; guessCheckButtonOnePlayer.height = 5; guessCheckButtonOnePlayer.bg = "White"; guessCheckButtonOnePlayer.disable(); pointsTextOnePlayer = Text(guessContainerOnePlayer, text="Score: ", grid=[0, 2], align="top") correctOnePlayer = Text(onePlayerWindow, text="", grid=[0, 3]) errorTextOnePlayer = Text(onePlayerWindow, text="Please enter a number!", grid=[0, 4]) errorTextOnePlayer.hide()
def Run(): global startWindow global finalCheck global startButtons startWindow = Window(app, title="Starting Screen", layout="grid") startWindow.width = 360; startWindow.height = 630; startWindow.bg = "Lime" playersQuestionText = Text(startWindow, text="How Many Players?", grid=[0, 0], align="top") playersQuestionText.text_size = 25 playerButtonContainer = Box(startWindow, layout="grid", grid=[0, 1], align="top", border=True) playerButtonContainer.set_border(10, "Lime") buttonOnePlayer = PushButton(playerButtonContainer, text="1 Player", grid=[1, 0], command=lambda: SetPlayerNumber(True, "1 Player")) buttonOnePlayer.width = 20; buttonOnePlayer.height = 10; buttonOnePlayer.bg = "White" buttonTwoPlayer = PushButton(playerButtonContainer, text="2 Player", grid=[2, 0], command=lambda: SetPlayerNumber(False, "2 Player")) buttonTwoPlayer.width = 20; buttonTwoPlayer.height = 10; buttonTwoPlayer.bg = "White" gameModeQuestionText = Text(startWindow, text="What Game Mode?", grid=[0, 2], align="top") gameModeQuestionText.text_size = 25 gameModeButtonContainer = Box(startWindow, layout="grid", grid=[0, 3], align="top", border=True) gameModeButtonContainer.set_border(10, "Lime") buttonAddition = PushButton(gameModeButtonContainer, text="Addition", grid=[1, 0], command=lambda: SetGameMode(True, "Addition")) buttonAddition.width = 20; buttonAddition.height = 10; buttonAddition.bg = "White" buttonSubtraction = PushButton(gameModeButtonContainer, text="Subtraction", grid=[2, 0], command=lambda: SetGameMode(False, "Subtraction")) buttonSubtraction.width = 20; buttonSubtraction.height = 10; buttonSubtraction.bg = "White" finalCheck = Box(startWindow, layout="grid", grid=[0, 4], align="top", border=True) finalCheck.set_border(10, "Lime") startButton = PushButton(finalCheck, text="Start!", grid=[0, 2], align="top", command=StartGame) startButton.width = 20; startButton.height = 5; startButton.bg = "White"; startButton.disable()
def CustomLiveCollection(): customInformationWindow = Window(app, title="Custom Information Entry", layout="grid") customInformationWindow.width = 450 customInformationWindow.height = 180 customInformationWindow.bg = "Grey" usageText = Text(customInformationWindow, text="Enter the number of cycles you wish to run for...", grid=[0, 0], align="top") usageText.text_size = 15 informationText = Text(customInformationWindow, text="1 Cycle = 10 seconds", grid=[0, 1], align="top") valueTextBox = TextBox(customInformationWindow, grid=[0, 2], align="top") valueTextBox.width = 6 valueTextBox.bg = "White" beginButton = PushButton( customInformationWindow, text="Begin...", grid=[0, 3], align="top", command=lambda: LiveCollection(valueTextBox.value)) beginButton.width = 15 beginButton.height = 5 beginButton.bg = "White"
def StartTwoPlayer(): global twoPlayerWindow global drawButtonTwoPlayer global cardImagesTwoPlayer1 global cardImagesTwoPlayer2 global guessContainerTwoPlayer1 global guessContainerTwoPlayer2 global guessTextBoxTwoPlayer1 global guessTextBoxTwoPlayer2 global guessCheckButtonTwoPlayer global correctTwoPlayer1 global correctTwoPlayer2 global errorTextTwoPlayer twoPlayerWindow = Window(app, title="Two Player Game", layout="grid") twoPlayerWindow.width = 660; twoPlayerWindow.height = 570; twoPlayerWindow.bg = "Lime" drawButtonTwoPlayer = PushButton(twoPlayerWindow, text="Draw!", grid=[0, 0], align="top", padx=20, command=ButtonSwapTwoPlayer) drawButtonTwoPlayer.width = 20; drawButtonTwoPlayer.height = 5; drawButtonTwoPlayer.bg = "White" cardImagesTwoPlayer1 = Box(twoPlayerWindow, layout="grid", grid=[0, 1], align="top", border=True) cardImagesTwoPlayer1.set_border(5, "Lime") cardImagesTwoPlayer2 = Box(twoPlayerWindow, layout="grid", grid=[1, 1], align="top", border=True) cardImagesTwoPlayer2.set_border(5, "Lime") guessContainerTwoPlayer1 = Box(twoPlayerWindow, layout="grid", grid=[0, 2], align="top", border=True) guessContainerTwoPlayer1.set_border(10, "Lime") guessTextBoxTwoPlayer1 = TextBox(guessContainerTwoPlayer1, grid=[0, 0], align="top") guessTextBoxTwoPlayer1.text_size = 20; guessTextBoxTwoPlayer1.bg = "White"; guessTextBoxTwoPlayer1.disable() guessContainerTwoPlayer2 = Box(twoPlayerWindow, layout="grid", grid=[1, 2], align="top", border=True) guessContainerTwoPlayer2.set_border(10, "Lime") guessTextBoxTwoPlayer2 = TextBox(guessContainerTwoPlayer2, grid=[0, 0], align="top") guessTextBoxTwoPlayer2.text_size = 20; guessTextBoxTwoPlayer2.bg = "White"; guessTextBoxTwoPlayer2.disable() pointsTextTwoPlayer1 = Text(guessContainerTwoPlayer1, text="Player One Score: ", grid=[0, 2], align="top") pointsTextTwoPlayer2 = Text(guessContainerTwoPlayer2, text="Player Two Score: ", grid=[0, 2], align="top") guessCheckButtonTwoPlayer = PushButton(twoPlayerWindow, text="Check!", grid=[0, 3], align="top", command=CheckValuesTwoPlayer) guessCheckButtonTwoPlayer.width = 20; guessCheckButtonTwoPlayer.height = 5; guessCheckButtonTwoPlayer.bg = "White"; guessCheckButtonTwoPlayer.disable() correctTwoPlayer1 = Text(guessContainerTwoPlayer1, text="", grid=[0, 3]) correctTwoPlayer2 = Text(guessContainerTwoPlayer2, text="", grid=[0, 3]) errorTextTwoPlayer = Text(twoPlayerWindow, text="Please Enter a Number!", grid=[0, 4]) errorTextTwoPlayer.hide()
def showBoard(): global board, tileButtonDict, tileList, gameBoard, difficulty createGame(difficulty) rowLabelCount = 0 columnLabelCount = 0 if len(tileList) > 256: rowLength = int(len(tileList)/16) else: rowLength = math.sqrt(len(tileList)) rowCount = 0 columnCount = 0 for tile in tileList: if not tile.isMined: surroundingMines = Text(board, text=str(tile.surroundingMineCount), grid=[columnCount,rowCount]) surroundingMines.height = 2 surroundingMines.width = 3 textDict[tile.label] = surroundingMines else: picture = Picture(board, image='bomb2.jpg', grid=[columnCount,rowCount]) picture.height = 25 picture.width = 15 mineDict[tile.label] = picture tileButton = PushButton(board, command=playGame, image = 'blank.jpg' , args=[tile], grid=[columnCount,rowCount], text='')#str(tile)#.isMined))#str(tile)) tileButton.bg = 'gray60' #print ('button grid', tileButton.grid) tileButton.when_right_button_pressed = markTile tileButton.width = 32 tileButton.height = 37 tileButtonDict[tile.label] = tileButton columnCount += 1 if columnCount == rowLength: rowCount += 1 columnCount = 0
def setup_board(): pictures = [] buttons = [] for x in range(0, 3): for y in range(0, 3): picture = Picture(picture_grid, image=get_random_sprite(), grid=[x, y]) picture.bg = "royal blue" picture.tk.config(height=100) picture.tk.config(width=100) pictures.append(picture) button_number = 0 for x in range(0, 3): for y in range(0, 3): button = PushButton(button_grid, command=match, args=[False], grid=[x, y]) button.width = 100 button.height = 100 button.icon(get_random_sprite()) button.bg = "dodger blue" button_number += 1 buttons.append(button) chosen_one = get_random_sprite() winning_button = randint(0, 8) buttons[winning_button].icon(chosen_one) buttons[winning_button].update_command(match, args=[True]) pictures[randint(0, 8)].value = chosen_one app.display()
ph_th.width = 10 ph_th.font = 'Source code pro' dox_th.width = 10 dox_th.font = 'Source code pro' divider = Text(box, text="", grid=[1, 3]) divider.width = 10 divider.font = 'Source code pro' temp_led = PushButton(box, text='', grid=[1, 4]) ph_led = PushButton(box, text='', grid=[2, 4]) dox_led = PushButton(box, text='', grid=[3, 4]) temp_led.width = 2 ph_led.width = 2 dox_led.width = 2 temp_led.height = 1 ph_led.height = 1 dox_led.height = 1 temp_led.bg = 'red' ph_led.bg = 'red' dox_led.bg = 'red' temp_led.disable() ph_led.disable() dox_led.disable() divider2 = Text(box, text="", grid=[1, 5]) divider2.width = 10 divider2.font = 'Source code pro' values_tag = Text(box, text="Sensor Values", grid=[1, 6]) values_tag.size = 10
startBtnSpacer = Text( startScr, text=" ", size=50, ) startBtn = PushButton( startScr, text="Start Game", command=gotoScreen0, padx=0, pady=0, ) startBtn.bg = "#e0e0e0" #light grey startBtn.width = 25 startBtn.height = 1 startBtn.text_size = 15 endBtnSpacer = Text(startScr, text=" ", size=25, align="bottom") endBtn = PushButton( startScr, text="Quit", command=windowClose, align="bottom", padx=0, pady=0, ) endBtn.width = 10 endBtn.height = 1 endBtn.text_color = "#ffffff" #white
#title.bg = (255,255,255) space2 = Text(app, text=" xxx", size=5) space2.text_color = "white" text_totalizer = Text(app, text="Jumlah Solar Didalam Tangki (liter)", size=30, grid=(1, 0, 1, 1)) totalizerVal = Text(app, text="0", size=140) button_pengisian = PushButton(app, text=">>", command=pengisian, align="bottom") #button_pengisian.bg="green" #button_pengisian.text_color="white" button_pengisian.width = 5 button_pengisian.height = 2 window = Window(app, title="Inlet Weighing Golden Rubber Indonesia", bg=(255, 255, 255)) space1 = Text(window, text=" xxx", size=10) space1.text_color = "white" space2 = Text(window, text=" xxx", size=5) space2.text_color = "white" text_pengisian = Text(window, text="Jumlah Total Pengisian Solar (liter)", size=30, grid=(1, 0, 1, 1)) pengisianVal = Text(window, text="0", size=140) pengisianVal.repeat(100, set_totalizer) pulse_value = Text(window, text=pulse_signal.value, size=14)
from guizero import App, Picture, PushButton, info app = App() anim = Picture(app, "guizero_flash.gif") anim.width = 200 anim.height = 100 button = PushButton(app, command=info, args=["button", "you pushed the image"], image="guizero_flash.gif") button.width = 200 button.height = 100 app.display()
app = App(title="different sizes", width=700, height=700) text = Text(app, "lets change some sizes") text.width = 30 text.height = 2 text_box = TextBox(app, "some text") text_box.width = 50 slider = Slider(app) slider.width = 300 slider.height = 30 button = PushButton(app) button.width = 20 button.height = 2 pic = Picture(app, image="guizero.gif") pic.width = 400 pic.height = 50 combo = Combo(app, ["martin", "laura", "rik"]) combo.width = 50 combo.height = 2 check = CheckBox(app, "tick me") check.width = 17 check.height = 2 button_group = ButtonGroup(app, ["cheese", "onion", "crisps"], 1) button_group.width = 35
startBtnSpacer = Text( startScr, text=" ", size=50, ) startBtn = PushButton( startScr, text="Start Game", command=gotoScreen0, padx=0, pady=0, ) startBtn.bg = "#e0e0e0" #light grey startBtn.width = 25 startBtn.height = 1 startBtn.text_size = 15 Text(startScr, text=" ", size=5) howToBtn = PushButton( startScr, text="How to Play", command=howTo, padx=0, pady=0, ) howToBtn.bg = "#e0e0e0" #light grey howToBtn.width = 25 howToBtn.height = 1 howToBtn.text_size = 15
def SQLQuerySelection(): queryWindow = Window(app, title="SQL Query Selection", layout="grid") queryWindow.width = 800 queryWindow.bg = "Grey" dataButtonContainer = Box(queryWindow, layout="grid", grid=[0, 0], align="top", border=True) dataButtonContainer.set_border(10, "Grey") allDataButton = PushButton( dataButtonContainer, text="Show All Data", grid=[0, 0], align="top", command=lambda: SQLQueriesExecution( "SELECT Date, Time, Temp, Humid, Press FROM WeatherData", "Date, Time, Temperature, Humidity, Pressure")) allDataButton.width = 10 allDataButton.height = 5 allDataButton.bg = "White" ''' Request all the fields from the database and orders then ascending by a specifc field Doesn't get any return variables ''' sortingText = Text(dataButtonContainer, text="Sort By:", grid=[0, 1], align="top") tempSortButton = PushButton( dataButtonContainer, text="Temperature (min - max)", grid=[0, 2], align="top", command=lambda: SQLQueriesExecution( "SELECT Date, Time, Temp, Humid, Press FROM WeatherData ORDER BY Temp ASC", "Date, Time, Temperature, Humidity, Pressure")) tempSortButton.width = 20 tempSortButton.height = 5 tempSortButton.bg = "White" humidSortButton = PushButton( dataButtonContainer, text="Humidity (min - max)", grid=[1, 2], align="top", command=lambda: SQLQueriesExecution( "SELECT Date, Time, Temp, Humid, Press FROM WeatherData ORDER BY Humid ASC", "Date, Time, Temperature, Humidity, Pressure")) humidSortButton.width = 20 humidSortButton.height = 5 humidSortButton.bg = "White" pressSortButton = PushButton( dataButtonContainer, text="Pressure (min - max)", grid=[2, 2], align="top", command=lambda: SQLQueriesExecution( "SELECT Date, Time, Temp, Humid, Press FROM WeatherData ORDER BY Press ASC", "Date, Time, Temperature, Humidity, Pressure")) pressSortButton.width = 20 pressSortButton.height = 5 pressSortButton.bg = "White"
align="top", text="Tequila", command=pour_tequila) rum_button = PushButton(ingredient_box, grid=[1, 0], align="top", text="Rum", command=pour_rum) vodka_button = PushButton(ingredient_box, grid=[2, 0], align="top", text="Vodka", command=pour_vodka) vodka_button.height = 10 vodka_button.width = 30 ## Button Box Setup button_one = PushButton(button_box, command=go_to_page, args=[1], text="<", grid=[0, 0]) button_two = PushButton(button_box, command=go_to_page, args=[2], text=">", grid=[1, 0]) raw_button = PushButton(button_box, command=go_to_page,
camera.exposure_compensation = expcomp.value def exposurereset(): expcomp.value = 0 test = TextBox(app, command=test, text="this is a pushbutton test") Preview = PushButton(app, command=preview, text="preview") Preview.font = "Times New Roman" Preview.text_color = "Red" Preview.height = "10" Preview.text_size = "15" StopPreview = PushButton(app, command=stop_preview, text="stop preview") shutter = PushButton(app, command=shutter, text="shutter") longexposurebutton = PushButton(app, command=longexposure, text="long exposure shutter") longexpslide = Slider(app, start=0, end=10, width=400) longexpteller = Text(app, text="long exposure slider")
space = Text(startwdw, text="", grid=[0, 0], size=5) welcome_message = Text(startwdw, text=" Coffee Roaster 2.0 ", grid=[0, 2], align="left", size=40, font="Helvetica", color="sienna4") space = Text(startwdw, text="", grid=[0, 3], size=10, align="bottom") startbt = PushButton(startwdw, text="START", command=start_program, grid=[0, 4], image="giantbean.gif") startbt.bg = "black" startbt.height = 170 startbt.width = 225 space = Text(startwdw, text="Click Bean to START", grid=[0, 5], size=26) window1 = Window(app, title="Coffee Roaster", width=480, height=320, layout="grid", bg="white") window1.hide() window1.tk.attributes("-fullscreen", True) #window1.show(wait=True) #welcome window space = Text(window1, text="", grid=[0, 0], size=3) Text1 = Text(window1, text=" Select Roast",
tkr.value = 'System: ' + str(datetime.datetime.now()) app = App(title="Aquarium GUI", width=800, height=400, layout="grid") # Build the data display grid data_boxes = [] for r_idx, row in enumerate(data_types): cols = [] for c_idx, col in enumerate(row): bx = Box(app, grid=[c_idx, r_idx]) txt_label = Text(bx, text=col) txt_label.size = label_size pb = PushButton(bx, text='') pb.text_size = data_size pb.height = 2 pb.width = 8 pb.bg = (225, 225, 225) # if col == 'Laser On': # pb.update_command(toggle_laser) # if col == 'Recording': # pb.update_command(toggle_recording) cols.append(pb) data_boxes.append(cols) logo = Picture(app, image="/home/pi/aquariumController/logoSmall.gif", grid=[4, 0]) # Add a ticker at the bottom of the app tkr = Text(app, text='System: ', grid=[0, 3, 4, 1])
command=you_chose_forward) combo.width = 60 combo.height = 5 result = Text(app) instructions = Text(app, text="Choose a backward speed") combo = Combo(app, options=[0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1], command=you_chose_backward) combo.width = 60 combo.height = 5 result = Text(app) Turtle_button = PushButton(app, command=Turtle, text="Turtle") Turtle_button.width = 20 Turtle_button.height = 10 Stop_button = PushButton(app, command=Stop, text="Stop") Stop_button.width = 20 Stop_button.height = 10 app.display() #while True: # instruction = input("Type in f or b or s") # # if instruction == "f": # speed = float(input("Type in the speed you want")) # robot.forward(speed) #elif instruction == "s": # robot.stop()
print("X: ", coordX) print("Y: ", coordY) coordX.sort() coordY.sort() print("liste ordinate:") print("X: ", coordX) print("Y: ", coordY) print(type(coordX)) print(type(coordY)) plt.plot(coordX, coordY) plt.ylabel('some numbers') plt.show() app = App(title='interfaccia') hello_text = Text(app, text='interfaccia', font='Arial', size=40) whatever = TextBox(app, width=30, multiline=True, height=2) whatever.value = 'interfaccia/grafico' push = PushButton(app, text='grafico', command=bottone0) push.width = 8 push.height = 3 app.display()
robot = CamJamKitRobot() def Stop(): robot.stop() app = App() instructions = Text(app, text="Choose a forward speed") combo = Combo(app, options=[0.15, 0.16, 0.17, 0.18, 0.19], command=you_chose_forward) combo.width = 60 combo.height = 5 result = Text(app) instructions = Text(app, text="Choose a backward speed") combo = Combo(app, options=[0.15, 0.16, 0.17, 0.18, 0.19], command=you_chose_backward) combo.width = 60 combo.height = 5 result = Text(app) Stop_button = PushButton(app, command=Stop, text="Stop") Stop_button.width = 20 Stop_button.height = 10 app.display()
#pulse_value.repeat(10,pulseVal) #cumulative_counting =Text(app, text="0", size=14, grid=[4,7,1,1], align="left") #cumulative_counting.text_color= "black" #cumulative_counting.repeat (10,normalCounting) # Text Box # input_target = TextBox(app, text="", grid=[1, 3, 3, 1]) input_target.text_size = 30 input_target.bg = "white" # Keypad # button1 = PushButton(app, Keypad_1, text="1", grid=[1, 4, 1, 1]) button1.bg = "black" button1.text_color = "white" button1.width = 5 button1.height = 2 button1.text_size = 15 button2 = PushButton(app, Keypad_2, text="2", grid=[2, 4, 1, 1]) button2.bg = "black" button2.text_color = "white" button2.width = 5 button2.height = 2 button2.text_size = 15 button3 = PushButton(app, Keypad_3, text="3", grid=[3, 4, 1, 1]) button3.bg = "black" button3.text_color = "white" button3.width = 5 button3.height = 2 button3.text_size = 15 button4 = PushButton(app, Keypad_4, text="4", grid=[1, 5, 1, 1]) button4.bg = "black"
def MainPage(): global mainWindow mainWindow = Window(app, title="S.W.I.G.G.S", layout="grid") mainWindow.width = 900 mainWindow.height = 850 mainWindow.bg = "Grey" titleText = Text( mainWindow, text="Sheldon Weather Information & Graph Generating Software", grid=[0, 0], align="top") titleText.text_size = 25 abbreviationText = Text(mainWindow, text="---S.W.I.G.G.S---", grid=[0, 1], align="top") abbreviationText.text_size = 20 spacerText = Text(mainWindow, text="", grid=[0, 2], align="top") spacerText.text_size = 20 savedText = Text(mainWindow, text="---Display Stored Data---", grid=[0, 3], align="top") savedText.text_size = 25 standardButtonContainer = Box(mainWindow, layout="grid", grid=[0, 4], align="top", border=True) standardButtonContainer.set_border(10, "Grey") dataButton = PushButton(standardButtonContainer, text="Display Data", grid=[0, 0], align="top", command=SQLQuerySelection) dataButton.width = 20 dataButton.height = 5 dataButton.bg = "White" graphButtonContainer = Box(standardButtonContainer, layout="grid", grid=[0, 1], align="top", border=True) graphButtonContainer.set_border(10, "Grey") tempGraphButton = PushButton(graphButtonContainer, text="Temperature Graph", grid=[0, 1], align="top", command=CreateTempGraph) tempGraphButton.width = 20 tempGraphButton.height = 5 tempGraphButton.bg = "White" humidGraphButton = PushButton(graphButtonContainer, text="Humidity Graph", grid=[1, 1], align="top", command=CreateHumidGraph) humidGraphButton.width = 20 humidGraphButton.height = 5 humidGraphButton.bg = "White" pressGraphButton = PushButton(graphButtonContainer, text="Pressure Graph", grid=[2, 1], align="top", command=CreatePressGraph) pressGraphButton.width = 20 pressGraphButton.height = 5 pressGraphButton.bg = "White" liveText = Text(mainWindow, text="---Live Data Collection---", grid=[0, 5], align="top") liveText.text_size = 25 informationText = Text(mainWindow, text="Collect Data for...", grid=[0, 6], align="top") informationText.text_size = 15 liveContainer = Box(mainWindow, layout="grid", grid=[0, 7], align="top", border=True) liveContainer.set_border(10, "Grey") ''' Runs LiveCollection function passing through the number of cycles to complete the displayed time on the button Doesn't get any return variables ''' hrs48Button = PushButton(liveContainer, text="48 Hours...", grid=[0, 0], align="top", command=lambda: LiveCollection(17280)) hrs48Button.width = 10 hrs48Button.height = 5 hrs48Button.bg = "White" hrs24Button = PushButton(liveContainer, text="24 Hours...", grid=[1, 0], align="top", command=lambda: LiveCollection(8640)) hrs24Button.width = 10 hrs24Button.height = 5 hrs24Button.bg = "White" hrs12Button = PushButton(liveContainer, text="12 Hours...", grid=[3, 0], align="top", command=lambda: LiveCollection(4320)) hrs12Button.width = 10 hrs12Button.height = 5 hrs12Button.bg = "White" hrs1Button = PushButton(liveContainer, text="1 Hours...", grid=[4, 0], align="top", command=lambda: LiveCollection(360)) hrs1Button.width = 10 hrs1Button.height = 5 hrs1Button.bg = "White" customButton = PushButton(mainWindow, text="Custom Time...", grid=[0, 8], align="top", command=CustomLiveCollection) customButton.width = 15 customButton.height = 5 customButton.bg = "White" warningContainer = Box(mainWindow, layout="grid", grid=[0, 9], align="top", border=True) warningContainer.set_border(30, "Grey") databaseButton = PushButton(warningContainer, text="!Create New Database!", grid=[0, 0], align="top", command=CreateNewDatabase) databaseButton.width = 20 databaseButton.height = 2 databaseButton.bg = "Red"