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 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 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 music_window(): window = Window(app, title="Music setting") window.bg = (156, 153, 153) Play = PushButton(window, text = "Play",command=self.start_music, width = "fill") Pause = PushButton(window, text = "Pause", command=self.pause_music, width = "fill") Continue = PushButton(window, text = "Continue", command=self.continue_music, width = "fill") next_ = PushButton(window, text = "next", command=self.next_music, width = "fill") previous = PushButton(window, text = "previous", command=self.previous_music, width = "fill") text_slider = Text(window, text="volume", width = "fill") music_volume = Slider(window, command = volume, width = "fill")
def test_getters_setters(): a = App() w = Window(a) w.title = "bar" assert w.title == "bar" w.bg = "red" assert w.bg == "red" w.height = 666 assert w.height == 666 w.width = 666 assert w.width == 666 a.destroy()
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 EndScreenOnePlayer(): global endOnePlayerWindow global playerOnePoints endOnePlayerWindow = Window(app, title="One Player End Screen", layout="grid") endOnePlayerWindow.width = 300; endOnePlayerWindow.height = 300; endOnePlayerWindow.bg = "Lime" gameOverOnePlayer = Text(endOnePlayerWindow, text="Game Over!", grid=[0, 0], align="top") gameOverOnePlayer.text_size = 40 yourScoreTextOnePlayer = Text(endOnePlayerWindow, text="Your Score", grid=[0, 1], align="top") yourScoreTextOnePlayer.text_size = 20 displayedScoreOnePlayer = Text(endOnePlayerWindow, text=playerOnePoints, grid=[0, 2], align="top") displayedScoreOnePlayer.text_size = 30 outOfOnePlayer = Text(endOnePlayerWindow, text="Out Of", grid=[0, 3], align="top") outOfOnePlayer.text_size = 20 onePlayerMaxScore = Text(endOnePlayerWindow, text="26", grid=[0, 4], align="top") onePlayerMaxScore.text_size = 30 restartButton = PushButton(endOnePlayerWindow, grid=[0, 5], text="Play Again", align="top", command=RestartGame) restartButton.bg = "White"
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"
def EndScreenTwoPlayer(): global endTwoPlayerWindow global playerOnePoints global playerTwoPoints endTwoPlayerWindow = Window(app, title="Two Player End Screen", layout="grid") endTwoPlayerWindow.width = 550; endTwoPlayerWindow.height = 350; endTwoPlayerWindow.bg = "Lime" gameOverTwoPlayer = Text(endTwoPlayerWindow, text="Game Over!", grid=[0, 0], align="top") gameOverTwoPlayer.text_size = 40 yourScoreTextTwoPlayer1 = Text(endTwoPlayerWindow, text="Player One Score", grid=[0, 1], align="top") yourScoreTextTwoPlayer1.text_size = 20 displayedScoreTwoPlayer1 = Text(endTwoPlayerWindow, text=playerOnePoints, grid=[0, 2], align="top") displayedScoreTwoPlayer1.text_size = 30 outOfTwoPlayer1 = Text(endTwoPlayerWindow, text="Out of", grid=[0, 3], align="top") outOfTwoPlayer1.text_size = 20 twoPlayerMaxScore1 = Text(endTwoPlayerWindow, text="13", grid=[0, 4], align="top") twoPlayerMaxScore1.text_size = 30 yourScoreTextTwoPlayer2 = Text(endTwoPlayerWindow, text="Player Two Score", grid=[1, 1]) yourScoreTextTwoPlayer2.text_size = 20 displayedScoreTwoPlayer2 = Text(endTwoPlayerWindow, text=playerTwoPoints, grid=[1, 2], align="top") displayedScoreTwoPlayer2.text_size = 30 outOfTwoPlayer2 = Text(endTwoPlayerWindow, text="Out of", grid=[1, 3], align="top") outOfTwoPlayer2.text_size = 20 twoPlayerMaxScore2 = Text(endTwoPlayerWindow, text="13", grid=[1, 4], align="top") twoPlayerMaxScore2.text_size = 30 competitionText = Text(endTwoPlayerWindow, text="", grid=[0, 5], align="top") competitionText.text_size = 20; competitionText.hide() if (playerOnePoints > playerTwoPoints): competitionText = Text(endTwoPlayerWindow, text="Player 1 Wins!", grid=[0, 5], align="top"); competitionText.text_size = 20; elif (playerOnePoints < playerTwoPoints): competitionText = Text(endTwoPlayerWindow, text="Player 2 Wins!", grid=[0, 5], align="top"); competitionText.text_size = 20; elif (playerOnePoints == playerTwoPoints): competitionText = Text(endTwoPlayerWindow, text="It's a Draw!", grid=[0, 5], align="top"); competitionText.text_size = 20; restartButton = PushButton(endTwoPlayerWindow, grid=[0, 6], text="Play Again!", align="top", command=RestartGame) restartButton.bg = "White"
# import libraries from guizero import App, PushButton, Slider, Text, Window from gpiozero import OutputDevice, PWMOutputDevice, AngularServo from gpiozero.pins.pigpio import PiGPIOFactory #Define the app and window for the servo sliders app = App("Dual Robot Control", layout='grid') servo_window = Window(app, "Servo Movement and PWM") servo_window.bg = (51, 165, 255) app.bg = (51, 246, 255) #Define the factories factory = PiGPIOFactory(host='') factory2 = PiGPIOFactory(host='') # Define both robots en_1 = PWMOutputDevice(12, pin_factory=factory) en_2 = PWMOutputDevice(26, pin_factory=factory) motor_in1 = OutputDevice(13, pin_factory=factory) motor_in2 = OutputDevice(21, pin_factory=factory) motor_in3 = OutputDevice(17, pin_factory=factory) motor_in4 = OutputDevice(27, pin_factory=factory) pin1 = OutputDevice(7, pin_factory=factory2) pin2 = OutputDevice(8, pin_factory=factory2) pin3 = OutputDevice(9, pin_factory=factory2) pin4 = OutputDevice(10, pin_factory=factory2) # Define the servos servo = AngularServo(22, min_angle=-90, max_angle=90, pin_factory=factory) servo_two = AngularServo(23, min_angle=-90, max_angle=90, pin_factory=factory)
control_app.font = 'Inter UI Bold' control_app.text_size = 10 control_app.height = 480 control_app.width = 800 control_app.tk.config(cursor='none') control_app.repeat(1000, thermalCountUp) # Feedback Window FeedbackWindow = Window(control_app) FeedbackWindow.text_size = 18 FeedbackWindow.font = 'Nexa Bold' FeedbackWindow.tk.attributes('-fullscreen',True) FeedbackWindow.height = 480 FeedbackWindow.width = 800 FeedbackWindow.hide() FeedbackWindow.bg = 'black' FeedbackWindow.tk.config(cursor='none') # buttons on feedback window gap = Text(FeedbackWindow,'') happy = Picture(FeedbackWindow, 'happy.gif') happy.when_clicked = goodFeedback gap = Text(FeedbackWindow,'') #happyText = Text(FeedbackWindow, text = 'I learned something\n new today!', grid = [1,0], color = 'white', align = 'left') confused = Picture(FeedbackWindow,'confused.gif') confused.when_clicked = badFeedback #confText = Text(FeedbackWindow, text = "I'm still not sure...", grid = [1,1], color = 'white', align = 'left') #smiley1 = PushButton(FeedbackWindow, text=':)', command=smiley1_callback) #smiley2 = PushButton(FeedbackWindow, text=':(', command=smiley2_callback)
OBCdate = PushButton(OBC, command=Date_Pressed, text=" Date", align="right", width="fill", grid=[0,10]) OBCdate.bg = "white" spacer = Text(OBC, text="", grid=[0,11]) spacer = Text(OBC, text="", grid=[0,12]) OBCtemp = PushButton(OBC, command=Temp_Pressed, text="Temp ", align="left", width="fill", grid=[0,13]) OBCtemp.bg = "white" OBCmemo = PushButton(OBC, command=Memo_Pressed, text=" Memo", align="right", width="fill", grid=[0,13]) OBCmemo.bg = "white" TrackMode= PushButton(OBC, command=TrackMode_Pressed, text="TRACK", width="fill", grid=[0,13]) TrackMode.bg = "white" #****************************************** #----------------TRACK MENU---------------- #****************************************** #TRACK = App(title="TRACK") TRACK = Window(OBC, title = "TRACK") TRACK.bg = "BLACK" #Gauge Face Cluster DrawingWidth = 300 DrawingHeight = 400 NumberOfGauges = 4 GaugeWidth = DrawingWidth GaugeHeight = 300 WarningWidth = DrawingWidth WarningHeight = 100 GaugeCluster = Drawing(TRACK, width=DrawingWidth, height=DrawingHeight) GaugeCluster.oval(0, 0, GaugeWidth/(NumberOfGauges/2), GaugeHeight/(NumberOfGauges/2), color="white", outline=True) GaugeCluster.oval(GaugeWidth/(NumberOfGauges/2), 0, GaugeWidth, GaugeHeight/(NumberOfGauges/2), color="white", outline=True) GaugeCluster.oval(0, GaugeHeight, GaugeWidth/(NumberOfGauges/2), GaugeHeight/(NumberOfGauges/2), color="white", outline=True) GaugeCluster.oval(GaugeWidth/(NumberOfGauges/2), GaugeHeight, GaugeWidth, GaugeHeight/(NumberOfGauges/2), color="white", outline=True) #Gauge Needles radius = GaugeWidth/4
power_button.text_color = (255, 30, 30) power_button.font = "verdana" power_button.text_size = 6 power_button.bg = "#620000" custom_button.text_color = (255, 30, 30) custom_button.font = "verdana" custom_button.text_size = 6 custom_button.bg = "#440000" # This block of code sets up the buttons and their functionality within the second (Setting temperature) window. window_two = Window(window_one, title="Setting temperature", layout="auto", visible=False) plastic_selection = Text(window_two) window_info = Text(window_two) b_temp = Text(window_two) n_temp = Text(window_two) window_two.bg = "white" # This block of code sets up the buttons and their functionality within the third (custom temperature) window. window_three = Window(window_one, title="Custom temperature", layout="auto", visible=False) other_info_two = Text(window_three, text="Barrel Temperature") barrel_custom = TextBox(window_three, text="400.0") b_up = PushButton(window_three, text="+", command=b_up_fcn) b_down = PushButton(window_three, text="-", command=b_down_fcn) other_info_three = Text(window_three, text="Nozzle Temperature") nozzle_custom = TextBox(window_three, text="400.0") n_up = PushButton(window_three, text="+", command=n_up_fcn) n_down = PushButton(window_three, text="-", command=n_down_fcn) enter = PushButton(window_three, text="Enter", command=other_temp_set) window_three.bg = "white" # Style block for the widgets within the custom temperature window.
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"
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"