from guizero import App, TextBox, PushButton, Text, info app = App() # Function definitions for your events go here. def btn_go_clicked(): info("Greetings", "Hello, " + txt_name.value + " - I hope you're having a nice day") def highlight(): txt_name.bg = 'light blue' def lowlight(): txt_name.bg = None # Your GUI widgets go here lbl_name = Text(app, text="Hello. What's your name?") txt_name = TextBox(app) # makes it so that the textbox is highlighted blue when mouse hovers over it. txt_name.when_mouse_enters = highlight txt_name.when_mouse_leaves = lowlight # command tells the push button which function to run when it is clicked. btn_go = PushButton(app, command=btn_go_clicked, text="Done") # Show the GUI on the screen app.display()
def backwards(): explorerhat.motor.one.backward(100) explorerhat.motor.two.backward(100) sleep(2) explorerhat.motor.one.stop() explorerhat.motor.two.stop() def right(): explorerhat.motor.one.backward(100) explorerhat.motor.two.forward(100) sleep(1.12) explorerhat.motor.one.stop() explorerhat.motor.two.stop() def left(): explorerhat.motor.one.forward(100) explorerhat.motor.two.backward(100) sleep(1.12) explorerhat.motor.one.stop() explorerhat.motor.two.stop() app = App("Mio controller") Goforwards = PushButton(app, forwards, text="Forwards") reverse = PushButton(app, backwards, text="Reverse") TurnRight = PushButton(app, right, text="Right") TurnLeft = PushButton(app, left, text="Left") app.display()
from guizero import App, PushButton, Slider app = App() # a PushButton's size is noted in characters button = PushButton(app) button.width = 30 button.height = 5 # a Slider's size is noted in pixels slider = Slider(app) slider.width = 300 slider.height = 30 app.display()
welcome_message.font_size(slider_value) if __name__ == '__main__': # the GUI app begins here. app = App("Hello world") # text widget welcome_message = Text( app, text="Welcome to my app", size=40, font="Times New Roman", color="lightblue" ) my_name = TextBox(app) # Argument 1: tells PushButton that app is its boss # Argument 2: command tells the button which function to call when pressed # Argument 3: text to be displayed update_text = PushButton(app, command=say_my_name, text='Display my name') text_size = Slider(app, command=change_text_size, start=10, end=80) my_image = Picture(app, image=img_url) # All code that creates a widget must be added before the event loop. # The following starts the event loop. app.display()
def do_booking(): info("Booking", "Loading") print( measure_choice.get() ) print( map_option.get_value() ) print( graphic_option.get_value() ) if measure_choice.get()=="Humidity" and map_option.get_value()==True: Humidity_map() if measure_choice.get()=="Humidity" and graphic_option.get_value()==True: Humidity_graphic() if measure_choice.get()=="Temperature" and graphic_option.get_value()==True: Temperature_graphic() if measure_choice.get()=="Temperature" and map_option.get_value()==True: Temperature_map() if measure_choice.get()=="Pressure" and graphic_option.get_value()==True: Pressure_graphic() if measure_choice.get()=="Pressure" and map_option.get_value()==True: Pressure_map() app = App(title="MMI", width=300, height=200, layout="grid") measure_choice = Combo(app, options=["Pressure", "Humidity", "Temperature"], grid=[0,1], align="left") film_description = Text(app, text="Which measure?", grid=[0,0], align="left") map_option = CheckBox(app, text="Map", grid=[1,1], align="left") graphic_option = CheckBox(app, text="Graphic", grid=[1,2], align="left") confirmation_button = PushButton(app, command=do_booking, text="confirm", grid=[3,1], align="left") app.display()
cap = cv2.VideoCapture(0) break app.update()''' pi_image = cv2.flip(pi_image, +1) pi_image = Image.fromarray(pi_image) qr_view.value = pi_image app.update() print(datetime.now() - a) #time.sleep(1) rawCapture.truncate(0) app.after(1, loop) app = App(layout="grid", title="Attendence") btn_reset = PushButton(app, command=reset_c, text="Close", grid=[0, 0]) btn_email = PushButton(app, command=reset_c, text="Email", grid=[1, 0]) btn_add_visitor = PushButton(app, command=reset_c, text="Add Visitor", grid=[2, 0]) #button = PushButton(app, command = counter_loop, text = "start loop") #counter = Text(app,"0",grid = [0,1]) #counter2 = Text(app,"0",grid = [1,1]) pic = Picture(app, image='logo.jpeg', width=200, height=200, grid=[0, 2, 3, 3]) qr_view = Picture(app, image='logo.jpeg', width=200, height=200, grid=[4, 2, 3, 3])
def exitProgram(): digitalWrite(myLED1, 0) app.destroy() app = App(title="TCSS573: IoT Activity 03", height=300, width=500) main = Text(app, text="Sensor Readings", size=14, font="Times New Roman", color="navy") box = Box(app, layout="grid", grid=[1, 0]) textT = Text(box, text="Temperature", align="left", grid=[0, 0]) textH = Text(box, text="Humimity", align="left", grid=[0, 8]) textTemp = Text(box, command = read_sensor, text = "BLUE", align="left", grid=[0, 0]) testHum = Text(box, command = read_sensor, text = "BLUE", align="left", grid=[0, 0]) repeat(1000, read_sensor) exitButton = PushButton(box, command=exitProgram, text="Exit", grid=[2, 18]) app.display()
#Interface app1 = App(title="Escolha o tipo de Enfermeiro: ", width=150, height=100, layout="grid") escolhaenfermeiro = Combo(app1, options=["transmissor", "recetor"], grid=[0, 1]) descricaoenfermeiro = Text( app1, text="Tipos:", grid=[0, 0], ) confirmar = PushButton(app1, command=tipo, text="Confirmar", grid=[3, 1], align="left") app1.display() app = App(title="Enfermeiro Móvel", layout="grid") welcome_message = Text(app, text="Enfermaria 1", size=40, font="Times New Roman", color="purple", grid=[0, 0]) #print(funcao)
#***************************functions end ***************************** app = App(title="مترو") #app = App(layout="grid") window = Window(app, title="Map") window.hide() maintext = Text(app, text="ticket type", size=60, font="Times new roman", color="red") open_button = PushButton(app, command=open_window, pady=80, padx=150, text="Show Map") x_3 = PushButton(app, command=select_3, pady=50, padx=120, text=" 3 جنيه", align="left") x_5 = PushButton(app, command=select_5, pady=50, padx=120, text=" 5 جنيه", align="left")
password='******', database='securehome') cursor = mariadb_connection.cursor() name = "" def say_my_name(): name = my_name.value app.destroy() app = App(title="Train Face", width="300", height="150") welcome_message = Text(app, text="Enter a Name") my_name = TextBox(app) update_text = PushButton(app, command=say_my_name, text="OK") def convertToBinaryData(filename): # Convert digital data to binary format with open(filename, 'rb') as file: binaryData = file.read() return binaryData camera = PiCamera() camera.resolution = (640, 480) camera.framerate = 30 rawCapture = PiRGBArray(camera, size=(640, 480)) faceCascade = cv2.CascadeClassifier("haarcascade_frontalface_default.xml")
app, layout="grid", width="fill", height="fill", grid=[0,0]) ############################################################################### ############################################################################### ############################# Main Page ####################################### ############################################################################### ############################################################################### button1 = \ PushButton( buttons_box_main, image=image_names_off[0], grid=[0,0], width=button_width, height=button_height, text="1") button1.bg = default_bg_color button2 = \ PushButton( buttons_box_main, image=image_names_off[1], grid=[1,0], width=button_width, height=button_height, text="2") button2.bg = default_bg_color
import guizero import subprocess import time import os from guizero import App, Text, PushButton, info def tenninty(): info("Recording...", "You are now recording...") os.system("raspivid -w 640 -h 480 -fps 90 -t 10000 -o 10s90fps.h264") info("Converting", "Converting your video. Please wait...") os.system("MP4Box -fps 90 -add 10s90fps.h264 10s90fps.mp4") info("Finished", "Your video is ready!") def tenfourtynine(): info("Recording...", "You are now recording...") os.system("raspivid -w 1296 -h 730 -fps 49 -t 10000 -o 10s49fps.h264") info("Converting", "Converting your video. Please wait...") os.system("MP4Box -fps 49 -add 10s49fps.h264 10s49fps.mp4") info("Finished", "Your video is ready!") app = App(title="CamPi") welcome_message = Text(app, text="CamPi") update_text = PushButton(app, command=tenninty, text="90 FPS for 10 Sec") update_text = PushButton(app, command=tenfourtynine, text="49 FPS for 10 Sec") app.display()
from guizero import App, Text, PushButton, TextBox import serial port = serial.Serial("/dev/ttyS0", baudrate=9600, timeout=1) def motor_avanza(): cmd = "F" port.write(cmd.encode()) rcv = port.read(20) def motor_reversa(): cmd = "B" port.write(cmd.encode()) rcv = port.read(20) def motor_stop(): cmd = "S" port.write(cmd.encode()) rcv = port.read(20) app = App(title="Control de Motor DC") message = Text(app, text="Control de Motor DC") avanza = PushButton(app, text="Avanza", command=motor_avanza) reversa = PushButton(app, text="Reversa", command=motor_reversa) alto = PushButton(app, text="Alto", command=motor_stop) app.display()
def check_input(): if un_box.value == username and pw_box.value == password: #message = Text(app, text='Correct') Picture(app, image="Tick.png") else: #message = Text(app, text="Incorrect!") Picture(app, image="giphy.gif") app.warn(title='Warning Virus Detected', text="Virus Detected") text1 = Text(app, text="Username", size=30, font="Algerian", color='white', align="top") un_box = TextBox(app, width=20, height=20) text2 = Text(app, text="Password", size=30, font="Algerian", color='white', align="top") pw_box = TextBox(app, width=20, height=20) submit = PushButton(app, text="submit", command=check_input) # app.yesno(title="Yes or No", text = "Would you like to close this window?") app.display()
board[x, y].dotty = False board.set_pixel(x, y, "white") board.enable() puntuaje = 0 reset.hide() texto.value = f"El puntuaje es {puntuaje}" board.after(1000, crear_punto()) #Apps app = App("Destruir puntos", height=250, width=250) #Widgets speed = 200 puntuaje = 0 CAJA_TAMAÑO = 5 board = Waffle(app, width=CAJA_TAMAÑO, height=CAJA_TAMAÑO, command=destruir_punto) board.after(speed, crear_punto) texto = Text(app, text="El puntuaje es 0") texto_puntos = Text(app, visible=False) reset = PushButton(app, text="Reiniciar", visible=False, command=reiniciarJuego) #display app.display()
# Setup the connection status indication connection_status_w = Text(app, text="WIFI", grid=[0, 0], align="left") connection_status_w.repeat(8000, update_connection_status) # Setup the App name thermostatPi3_name_w = Text(app, text=" thermostatPi3", grid=[1, 0], align="left") thermostatPi3_name_w.text_color = "gray" # Temperature controls temp_up_w = PushButton(app, text="TEMP UP", command=increase_set_point, grid=[2, 1], align="right") temp_up_w.tk.config(highlightthickness=0) temp_up_w.tk.config(borderwidth=0) temp_up_w.text_color = "red" temp_down_w = PushButton(app, text="TEMP DOWN", command=decrease_set_point, grid=[2, 3], align="right") temp_down_w.tk.config(highlightthickness=0) temp_down_w.tk.config(borderwidth=0) temp_down_w.text_color = "blue"
def print_bottom(): print("bottom button") def hide(): b00.hide() b01.hide() b10.hide() b11.hide() b_bottom.hide() def show(): b00.show() b01.show() b10.show() b11.show() b_bottom.show() app = App(layout="grid") b00 = PushButton(app, print_pos, text="0,0", args=[0,0], grid=[0,0]) b01 = PushButton(app, print_pos, text="0,1", args=[0,1], grid=[0,1]) b10 = PushButton(app, print_pos, text="1,0", args=[1,0], grid=[1,0]) b11 = PushButton(app, print_pos, text="1,1", args=[1,1], grid=[1,1]) b_bottom = PushButton(app, print_bottom, text="span the bottom", grid=[0,2,2,1]) b_hide = PushButton(app, hide, text="hide", grid=[0,3]) b_show = PushButton(app, show, text="show", grid=[1,3]) app.display()
from guizero import App, TextBox, PushButton, info def subtracao(): val = float(num1.value)+ float(num2.value) info("info", "a soma resultou: {}".format(val)) app = App() num1 = TextBox(app) num2 = TextBox(app) button = PushButton(app, text="Somar", command=subtracao) app.display()
from guizero import App, PushButton, Text, Box app = App() top_box = Box(app, align="top", width="fill") PushButton(top_box, text="to the left", align="left") PushButton(top_box, text="to the left", align="left") Text(app, text="everything you own", align="top") left_box = Box(app, align="left") left_box.border = True Text(left_box, text="in a box to the left") app.display()
def question(): a = random.randint(0, len(questions) - 1) return a b = question() def message(): global b b = random.randint(0, len(questions) - 1) ran = questions[b] messages.value = ran print(messages.get()) test.value = 'enter another response' app = App("How to make friends") def answer(): messages.value += "\n\n here are some other responeses: \n\n\n" + r1[ b] + '\n\n' + r2[b] + '\n\n' + r3[b] button = PushButton(app, message, text="new question") test = TextBox(app, text="enter your response...", width="60") messages = Text(app, text=questions[b], color="black") b3 = PushButton(app, answer, text="answer") app.display()
Count_PWDLV_Box = Box(app, border=False, width="fill", align="top", layout="grid") # Round Counter box Counter_box = Box(Count_PWDLV_Box, layout="grid", grid=[0, 0], width="fill") count_label = Text(Counter_box, text="Rounds", grid=[0, 0], align="left") Round_Counted = Box(Counter_box, border=True, grid=[0, 1], align="left") counted_Rounds = Text(Round_Counted, text="100") Primer_Label = Text(Counter_box, text="Primers", grid=[1, 0], align="left") Primer_Counter = Box(Counter_box, border=True, grid=[1, 1], align="left") Primers_Counted = Text(Primer_Counter, text="50") Primer_reset_button = PushButton(Counter_box, text="Primer", grid=[2, 1], align="left") Case_reset_button = PushButton(Counter_box, text="Case", grid=[3, 1], align="left") pause_button = PushButton(Counter_box, text="Pause", grid=[4, 1], align="left") #Logo logo = Picture( Count_PWDLV_Box, image= "/home/pi/Documents/Reloading-Press-Monitor-main/GUI_Working/logo2.png", height=100, width=450, grid=[1, 0])
def stop_two(): torvalds.stop() def servo_movement(slider_value): servo.angle = int(slider_value) def servo_two_movement(slider_value): servo_two.angle = int(slider_value) # Define the buttons for movement # Forward button for Linus button1 = PushButton(app, text="f", grid=[0, 0]) button1.text_size = 20 button1.bg = "green" button1.when_left_button_pressed = direction_one button1.when_left_button_released = stop #Backward Button for Linus button2 = PushButton(app, text="b", grid=[1, 0]) button2.text_size = 20 button2.bg = "green" button2.when_left_button_pressed = direction_two button2.when_left_button_released = stop # Forward button for Torvalds button3 = PushButton(app, text="n", grid=[2, 0]) button3.text_size = 20 button3.bg = "red" button3.when_left_button_pressed = north
cam.set(3,1024) cam.set(4,768) def move_forward(event, motor_name): print("Moving forward") motor_name.forward(speed=1) def move_backward(event, motor_name): print("Moving backward") motor_name.backward(speed=1) def release(event, motor_name): print("Stopped") motor_name.stop() button1 = PushButton(app, text = "move forward") button2 = PushButton(app, text = "move backward") button3 = PushButton(app, text = "Dummy extender-1") button4 = PushButton(app, text = "Dummy retractor-2") # Motor 1 button1.tk.bind("<ButtonPress>", lambda event, arg = motor: move_forward(event, arg)) button2.tk.bind("<ButtonPress>", lambda event, arg = motor: move_backward(event, arg)) button1.tk.bind("<ButtonRelease>", lambda event, arg = motor: release(event, arg)) button2.tk.bind("<ButtonRelease>", lambda event, arg = motor: release(event, arg)) # Motor 2: button3.tk.bind("<ButtonPress>", lambda event, arg = motor2: move_forward(event, arg)) button4.tk.bind("<ButtonPress>", lambda event, arg = motor2: move_backward(event, arg))
message = "The All Seeing Pi saw you!" with open(output, 'rb') as photo: twitter.update_status_with_media(status=message, media=photo) # Set up buttons next_overlay_btn = Button(23) next_overlay_btn.when_pressed = next_overlay take_pic_btn = Button(25) take_pic_btn.when_pressed = take_picture # Set up camera (with resolution of the touchscreen) camera = PiCamera() camera.resolution = (1024, 768) camera.hflip = True # Start camera preview camera.start_preview(alpha=128) # Set up filename output = "" latest_photo = '/home/pi/allseeingpi/latest.gif' app = App("The All Seeing Pi", 800, 480) #app.attributes("-fullscreen", True) message = Text(app, "I spotted you!") your_pic = Picture(app, latest_photo) new_pic = PushButton(app, new_picture, text="New picture") tweet_pic = PushButton(app, send_tweet, text="Tweet picture") app.display()
GPSspeedMainReading = GPSGaugeCluster.text(GPSspeedxc , GPSspeedyc+35, text = GPSspeedTargetP,size=20) #****************************************** #----------------OBC MENU---------------- #****************************************** OBC = App(title="OBC", layout="grid") OBC.bg = "#5E0000" spacer = Text(OBC, text = " ", font="digital-7", height="1", size=9, color="orange", grid=[0,0]) spacer = Text(OBC, text="", grid=[0,1]) OBCMainText = Text(OBC, text = "Loading", font="digital-7", height="2", size=50, color="orange", grid=[0,2]) OBCMainText.repeat(250, OBC_Data) spacer = Text(OBC, text="", grid=[0,3]) spacer = Text(OBC, text="", grid=[0,4]) spacer = Text(OBC, text="", grid=[0,5]) spacer = Text(OBC, text="", grid=[0,6]) OBChdat = PushButton(OBC, command=hdat_Pressed, text="h/dat ", align="left", width="fill", grid=[0,7]) OBChdat.bg = "white" OBCmindat = PushButton(OBC, command=mindat_Pressed, text=" min/dat", align="right", width="fill", grid=[0,7]) OBCmindat.bg = "white" spacer = Text(OBC, text="", grid=[0,8]) spacer = Text(OBC, text="", grid=[0,9]) OBChour = PushButton(OBC, command=Hour_Pressed, text="Hour ", align="left", width="fill", grid=[0,10]) OBChour.bg = "white" 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"
''' app = App(title="Blackjack 21", width=1000, height=1000) # The welcoming message to the game welcome_message = Text(app, "Welcome to Blackjack!", size=40, color="lightblue", font="Times New Roman") rules = Text(app, "This is a game where you play the AI (house), and attempt to get as close to 21, without going over", size=18) rules_2 = Text(app, "Each turn you can choose to hit (draw a card), or stay (keep your cards). If you stay, house will begin drawing.", size=18) rules_3 = Text(app, "Hint - House must draw until they have over 17, so you have a chance of winning even if you have low values.",size=14, color="red") start_text = Text(app, "Click 'start' to start the game") # Where player cards and score is displayed player_box = Box(app) total = "Your score: 0" player_total = Text(player_box, total, align="right") # Simply holds the stack picture stack_pic = Picture(app, image="images/stack_resized.png", align="top") # Where house cards and score is displayed house_box = Box(app) total_2 = "House score: 0" house_total = Text(house_box, total_2, align="right") # Buttons to play the game start_button = PushButton(app, command=startGame, text="Start!", width=30, pady=20) hit_button = PushButton(app, command=hit, text="Hit!", width=30, pady=20, enabled=False) stay_button = PushButton(app, command=stay, text="Stay!", width=30, pady=20, enabled=False) # Start the game app.display()
time.sleep(1) camera.capture('/home/pi/Documents/spinTemp/image15.jpg') camera.stop_preview() print('begin conversion') strCount = str(fileNameNum) system('convert -delay 20 -loop 0 /home/pi/Documents/spinTemp/image*.jpg /home/pi/Desktop/SpinGifs/spin.gif') print('conversion complete') newFileName = '/home/pi/Desktop/SpinGifs/' + TextBox.get(fileNameText) + TextBox.get(fileNameNum) +'.gif' tempName = '/home/pi/Desktop/SpinGifs/spin.gif' shutil.move(tempName, newFileName) print('File Renamed') def testCamera(): camera.start_preview() time.sleep(10) camera.stop_preview() app = App(title="Spin Control") message = Text(app, text="Welcome to Spin Control") recordButton = PushButton(app, command=recordObject, text="Record") testButton = PushButton(app, command=testCamera, text="Test Camera") fileNameText = TextBox(app, text="spin") fileNameNum = TextBox(app, width = "3", text="0") app.display()
closeButton = Picture(infoWindow, 'closeInfo.gif', grid = [1,1]) closeButton.when_clicked = closeInfo # need to include an admin button. press and hold? adminWindow = Window(control_app, title='Admin', layout='grid') adminWindow.hide() # start in admin window adminWindow.height = 480 adminWindow.width = 800 adminWindow.tk.attributes('-fullscreen', fullScreen) adminWindow.text_size = 16 adminWindow.font = 'FreeMono' tempText = Text(adminWindow, text = 'temp', grid = [2,2]) adminWindow.repeat(5000,updateTemp) feedbackText = Text(adminWindow, text='Feedback Scores', grid = [0,0,1,3]) RespawnButton = PushButton(adminWindow, text = 'Respawn', grid = [2,5], command = respawn) RestartStream = PushButton(adminWindow, text = 'Restart Stream', grid = [2,6], command = restartPyaudio) closeAdminButton = PushButton(adminWindow, text = 'x', grid = [4,0], command = closeAdmin) closeAdminButton.bg = 'red' gapAdmnin = Text(adminWindow,text=' ',grid = [1,0,1,2]) upButton = PushButton(adminWindow,text='+', command=timerIncrement, grid=[4,1]) downButton = PushButton(adminWindow, text='-', command=timerDecrement, grid=[2,1]) timerText = Text(adminWindow, text='{} min '.format(timerMax//60), grid=[3,1]) timerinfo = Text(adminWindow, text='Thermal cutout', grid = [2,0,3,1]) setupButton = PushButton(adminWindow, text = 'Setup', command = launchSetupWizard, grid = [0,5]) setuptext = Text(adminWindow, text = 'Run Setup before first launch ', grid = [0,6], align = 'left') # restartButton = PushButton(adminWindow,text='Reset',grid = [4,4], command = restart, args = stream) # Padding is implemented using empty text boxes (!)
# Close the connection conn.close() def displaytable(): ALL = conn.execute('SELECT * FROM Customers') for row in ALL: Idshow.append(row[0]) Nameshow.append(row[1]) Dobshow.append(row[2]) Showid = Text(app, text=Idshow, grid=[1, 4]) Shown = Text(app, text=Nameshow, grid=[1, 5]) Showd = Text(app, text=Dobshow, grid=[1, 6]) Enter = PushButton(app, command=entervalues, grid=[1, 2], text="Enter") DisplayAll = PushButton(app, command=displaytable, grid=[1, 3], text="Display All Values") Id_box = TextBox(app, grid=[0, 1]) Name_box = TextBox(app, grid=[1, 1]) Date_box = TextBox(app, grid=[2, 1]) Id_text = Text(app, text="ID", grid=[0, 0]) Name_text = Text(app, text="Last Name", grid=[1, 0]) Date_text = Text(app, text="Date of Birth", grid=[2, 0]) Id_box.bg = "white" Name_box.bg = "white" Date_box.bg = "white" Enter.bg = "white" app.display()
#windows ends #main window starts # user can login or logout on this window # admin menu can be accessed from here main_window_time = Text(app, text=strftime("%H:%M:%S", gmtime()), grid=[0,0]) main_window_time.repeat(100, update_time) # Schedule call to update time main_window_date = Text (app, text=strftime("%d,%b,%Y", gmtime()), grid=[0,1]) main_window_date.repeat(10800000, update_date) #repeat every 3hrs module_test = Text(app, text="checking modules...", grid=[0,2]) admin_menu_btn = PushButton(app, text="ADMIN MENU" ,command=admin_warn, grid=[0,4]) admin_menu_btn.bg = "blue" msg_text = Text(app, text="####", grid=[0,5]) #msg_text.repeat(5000, update_msg) attendance_text = Text(app, text="####", grid=[0,6]) picture1 = Picture(app, image="28.jpg", grid=[1,0,3,6]) module_init() #initialize module #main window ends #admin menu window starts admin_main_menu_btn = PushButton(admin_menu_window, text="Main Menu" ,command=check_admin_pass, grid=[0,0]) admin_main_menu_btn.bg = "blue" back_btn = PushButton(admin_menu_window, text="Back" ,command=admin_back, grid=[1,0])
def start(): update_text = PushButton(app, program, text="START") update_text.config(height=2, width=30)
insultBox.hide() buttonBox2.hide() cyoBox.show() buttonBox3.show() #welcome screen titleText = Text(app, text = "Insult Generator", color="firebrick3", size=38, font="Free Mono", align="top") welcomeBox = Box(app, border=0, align="top") buttonBox1 = Box(app, width="fill", align="bottom") prisonmike = Picture(welcomeBox, image="prisonmike.gif", align="top") insultButton = PushButton(buttonBox1, text="Generate Insult", command = insultScreen, align="bottom") insultButton.text_size = 15 insultButton.font = "Free Mono" insultButton.bg = "firebrick3" insultButton.text_color = "snow" #insult screen insultBox = Box(app, border=0, align="top") insultBox.hide() buttonBox2 = Box(app, width="fill", align="bottom") buttonBox2.hide() backButton1 = PushButton(buttonBox2, text="<< Back", command=welcomeScreen, align = "left") backButton1.text_size = 15