def init_widgets(): global app, Weather_drawing, Add_textbox, To_do_list_Title, Addbutton, delbutton, Clearbutton, Citybutton To_do_list_Title = Text(app, "To-do List:", size=20, color="light gray", grid=[0,2,1,1],align="left") create_list() Add_textbox=TextBox(app,grid=[0,4,1,1],width=50, align="left") Add_textbox.text_size=12 Add_textbox.text_color="Black" Add_textbox.font="Century Gothic Bold" Add_textbox.bg="white" Addbutton = PushButton(app, command=addto_todolist, image="Images/add_button.png", grid=[0,4,1,1],align="right") delbutton = PushButton(app, command=delfrom_todolist, image="Images/sub_button.png", grid=[1,4,4,1],align="right") Clearbutton = PushButton(app, command=clear_todolist, image="Images/clear_button.png", grid=[0,5], width=100, height=50, align="left") Clearbutton.bg = "light gray" Citybutton = PushButton(app, command=change_city, image="Images/Change_city_button.png", grid=[0,5], width=160, height=50) Citybutton.bg = "light gray" Weather_drawing = Drawing(app,grid=[0,6,2,1],align="left",width=600,height=300) weather_font_color = which_color(description) Image_picture = which_image(description) update_weather() Weather_drawing.image(0,0,image="Images/" + Image_picture, width=600,height=400) city_num_x = 200 - (len(city_name)*10) city_num_y = 0 Weather_drawing.text(city_num_x,city_num_y, text= city_name, color=weather_font_color,font="Arial",size=40) Weather_drawing.text(135 - len(temp),45, text= temp, color=weather_font_color,font="Arial",size=50) Weather_drawing.text(110 - len(temp),110, text= "Low:" + temp_min, color=weather_font_color,font="Arial",size=15) Weather_drawing.text(225 - len(temp) + len(temp_high)*2,110, text= "High:" + temp_high, color=weather_font_color,font="Arial",size=15) Weather_drawing.text(150 - len(humidity),135, text= "Humidity: " + humidity, color=weather_font_color,font="Arial",size=15) Weather_drawing.text(125 - len(wind_speed),155, text= "Wind Speed: " + wind_speed, color=weather_font_color,font="Arial",size=15) Add_textbox.when_clicked = Make_keys
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 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 add_row(): global add_button global subtract_button global json_file row = 2 + len(json_file["profile"]) x = 8 coords = [] for coord in range(0, 2): entry = TextBox(box2, coord, grid=[x, row]) entry.when_left_button_released = text_click entry.bg = "white" coords.append(entry) x += 1 row += 1 add_button.destroy() subtract_button.destroy() add_button = PushButton(box2, text="+", grid=[8, row], command=add_row) add_button.bg = "white" subtract_button = PushButton(box2, text="-", grid=[9, row], command=subtract_row) subtract_button.bg = "white" json_file["profile"].append(coords)
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 change_city(): global app global window global Display_list, Weather_drawing, Add_textbox, To_do_list_Title, Addbutton, delbutton, Clearbutton, Citybutton, Spotifybutton def Confirm_city(): global city_name if (City_name_entry_textbox.value): city_name = City_name_entry_textbox.value f = open("Weather_loc.txt", "w") f.write(city_name) f.close() Confirmbutton.destroy() City_name_entry_textbox.destroy() City_name_ask_title.destroy() Destroy_keys() init_widgets() if (keys_exist == 1): Destroy_keys() To_do_list_Title.destroy() Add_textbox.destroy() Addbutton.destroy() delbutton.destroy() Citybutton.destroy() Spotifybutton.destroy() Display_list.destroy() Clearbutton.destroy() Weather_drawing.destroy() City_name_ask_title = Text(app, "Type the name of a city:", size=35, font="Century Gothic Bold", color="light gray", grid=[0, 2, 2, 1], align="left") City_name_entry_textbox = TextBox(app, grid=[0, 3], width=50) City_name_entry_textbox.text_size = 12 City_name_entry_textbox.text_color = "Black" City_name_entry_textbox.font = "Century Gothic Bold" City_name_entry_textbox.bg = "white" City_name_entry_textbox.when_clicked = Make_keys Confirmbutton = PushButton(app, command=Confirm_city, image="Images/Confirm.png", grid=[0, 4], width=120, height=50) Confirmbutton.bg = "light gray" app.focus()
Display_list.text_color = "light gray" Display_list.text_size = 20 Display_list.font = "Century Gothic Bold" #Create New list create_list() #Text box for typing ######################################################################################################### global Add_textbox Add_textbox = TextBox(app, grid=[0, 4, 1, 1], width=50, align="left") Add_textbox.text_size = 12 Add_textbox.text_color = "Black" Add_textbox.font = "Century Gothic Bold" Add_textbox.bg = "white" #Add button and add function ######################################################################################################### def addto_todolist(): global Display_list global Todolist global Add_textbox if (Add_textbox.value): f = open("Todolist.txt", "a") f.write(Add_textbox.value + "\n") f.close() Todolist.append(Add_textbox.value) Display_list.append(Add_textbox.value) print(Todolist)
if str(textbox2.get()) == "": slider2.value = "0" else: slider2.value = textbox2.value def c_slider_val_3(): if str(textbox3.get()) == "": slider3.value = "0" else: slider3.value = textbox3.value box1 = Box(app,border=True, grid=[0,0],layout="grid") Text(box1, grid=[0,0],text="") Text(box1, grid=[0,1], text="Motor 1") m1 = TextBox(box1, grid=[1,1], text="90") m1.bg=(190,220,249) Text(box1, grid=[0,2], text="Motor 2") m2 = TextBox(box1, grid=[1,2], text="90") m2.bg=(190,220,249) Text(box1, grid=[0,3], text="Motor 3") m3 = TextBox(box1, grid=[1,3],text="45") m3.bg=(190,220,249) Text(box1, grid=[1,4],text="") PushButton(box1, grid=[1,5], text="OK", width=2, height=1, align="right") box_s = Box(app, grid=[1,0]) Text(box_s, text=" ")
base_interface = Box(bottom, width=appWidth / 2, align="left") arm_interface = Box(bottom, width=appWidth / 2, align="right") # RGB Color Interface color_header = Text(color_interface, text="Adjust RGB Background Color", color="#002699", size=20, grid=[0, 0]) r_label = Text(color_interface, text="R :", color="#1a53ff", size=15, grid=[0, 1]) r_input = TextBox(color_interface, grid=[1, 1]) r_input.bg = "#ff5c33" r_input.text_color = "#1a53ff" g_label = Text(color_interface, text="G :", color="#1a53ff", size=15, grid=[0, 2]) g_input = TextBox(color_interface, grid=[1, 2]) g_input.bg = "#ff5c33" g_input.text_color = "#1a53ff" b_label = Text(color_interface, text="B :", color="#1a53ff", size=15, grid=[0, 3]) b_input = TextBox(color_interface, grid=[1, 3])
spacerb = Text(app, text="") # Spacer B clear = PushButton(app, clearlist, text="Clear list") # Clear list button clear.bg = "#565656" clear.text_size = 13 clear.font = "Cascadia Code" spacerc = Text(app, text="") # Spacer C calculate = PushButton(app, calcular, text="Calculate") # "Calculate" calculate.bg = "#565656" calculate.text_size = 13 calculate.font = "Cascadia Code" spacerd = Text(app, text="") # Spacer D functionlist = PushButton(app, flist, text="Function List") # Function List functionlist.bg = "#565656" functionlist.text_size = 11 functionlist.font = "Cascadia Code" # BG colors operacao.bg = "#565656" numinsert.bg = "#565656" # Drawing variable initialize drawingres = Drawing(app, width="fill", height="fill") # Display app.display()
def tasto2(): plt.scatter(coordX,coordY) plt.plot(coordX,coordY) plt.ylabel('some numbers') plt.show() app = App(title='interfaccia-grafico') grafico_text = Text(app, text='Grafico', font = 'arial', size=40) whatever = TextBox(app, width=50, multiline=True, height=2) whatever.value='Interfaccia grafico' push1 =PushButton(app, text='definire le coordinate', command=tasto0) push2 =PushButton(app, text='coordinate', command=tasto1) push3 = PushButton(app, text='grafico', command=tasto2) app.bg="#000000" grafico_text.text_color ="#FFFFFF" whatever.bg="#FFFFFF" push1.bg="#E52B50" push2.bg="#CC9966" push3.bg="#5E86C1"
def h(): app = App(width=800, height=800, title="my first GUI") app.bg = (156, 153, 153) init_control() # menu bar menubar = MenuBar(app, toplevel=["File", "view"], options=[[["music", music_window], ["Exit", exit_app]], [["full-screen", full_screen], ["normal screen", normal_screen]]]) name_box = Box(app, border=1, width="fill") Text(name_box, font="Times New Roman", text="Hosni RPi-GUI-App", width="fill", color=(0, 0, 128)) # win of music Text(app, font="Times New Roman", text="Music", width="fill", color=(145, 15, 15)) music_box1 = Box(app, border=1, width="fill") music_window_button = PushButton( music_box1, align="left", text="Music", command=music_window ) #, image = "/home/pi/Desktop/music/download.png") music_volume_slider = Slider(music_box1, start=100, end=0, command=music_volume, height="fill", width=20, horizontal=False, align="left") music_box2 = Box(music_box1, align="left", width="fill") music_play_button = PushButton(music_box2, text="Play", command=start_music, width="fill") music_pause_button = PushButton(music_box2, text="Pause", command=pause_music, width="fill") music_continue_button = PushButton(music_box2, text="Continue", command=continue_music, width="fill") music_next_button = PushButton(music_box2, text="next", command=next_music, width="fill") music_previous_button = PushButton(music_box2, text="previous", command=previous_music, width="fill") #box3 = Box(box1,align = "left", width = "fill") #music_volume = Slider(box3,start = 100, end = 0 ,command = volume, height = 200, horizontal = False, align = "left") # led intensity text_ledpwm = Text(app, font="Times New Roman", text="LED intensity", width="fill", color=(145, 15, 15)) box4 = Box(app, border=1, width="fill") LEDPwm = Slider(box4, command=LED_intensity_control, width="fill", align="left") LEDPwm.bg = (255, 255, 255) text2 = Text(box4, text="D of LED = 0 %", align="left") text2.text_color = (0, 0, 128) # Fan speed fan_speed_text = Text(app, font="Times New Roman", text="Fan speed", width="fill", color=(145, 15, 15)) fan_speed_box = Box(app, border=1, width="fill") fan_speed_slider = Slider(fan_speed_box, command=fan_speed_control, width="fill", align="left") fan_speed_slider.bg = (255, 255, 255) fan_speed_display = Text(fan_speed_box, text="D of fan= 0 %", align="left") fan_speed_display.text_color = (0, 0, 128) # Ddisplay on lcd lcd_text = Text(app, font="Times New Roman", text="LCD", color=(145, 15, 15)) lcd_box = Box(app, border=1, width="fill") lcd_text_box = TextBox(lcd_box, width="fill", align="left") disply_lcd = PushButton(lcd_box, text="Display", command=display_on_lcd, align="left") lcd_text_box.bg = (255, 255, 255) lcd_text_box.text_size = 15 # Servo motor servo_text = Text(app, font="Times New Roman", text="Servo angle", width="fill", color=(145, 15, 15)) servo_box1 = Box(app, border=1, width="fill") servo_angle = TextBox(servo_box1, width="fill", align="left") rotate = PushButton(servo_box1, text="Rotate", align="left", command=servo_rotate) servo_box2 = Box(app, border=1, width="fill") rotate_0 = PushButton(servo_box2, text="Rotate 0 ", align="left", width="fill", command=servo_rotate_zero) rotate_90 = PushButton(servo_box2, text="Rotate 90", align="left", width="fill", command=servo_rotate_90) rotate_180 = PushButton(servo_box2, text="Rotate180", align="left", width="fill", command=servo_rotate_180) servo_angle.bg = (255, 255, 255) servo_angle.text_size = 15 # Control room light room_text = Text(app, font="Times New Roman", text="Room Light", width="fill", color=(145, 15, 15)) room_box = Box(app, border=1, width="fill") room_turnon = PushButton(room_box, text="Turn on", width="fill", command=turn_on, align="left") room_turnoff = PushButton(room_box, text="Turn off", width="fill", command=turn_off, align="left") room_state = Text(room_box, align="left") room_state.value = "OFF" room_state.text_color = (102, 0, 51) Text(app) # Box which group the four boxes sensors_box = Box(app, width="fill") # display ultrasonic reading ultrasonic_box = Box(sensors_box, border=1, width="fill", align="left") ultrasonic_text = Text(ultrasonic_box, font="Times New Roman", text="Ultrasonic Reading", width="fill", color=(145, 15, 15)) ultrasonic_reading_text = Text(ultrasonic_box, text="the Distance = 0 CM") ultrasonic_reading_text.repeat(200, ultrasonic_measure) # PIR object Detection PIR_box = Box(sensors_box, border=1, width="fill", align="left") PIR_text = Text(PIR_box, font="Times New Roman", text="Object Detection", width="fill", color=(145, 15, 15)) PIR_reading_text = Text(PIR_box) PIR_reading_text.repeat(150, PIR_detect) # Sound sensor sound_box = Box(sensors_box, border=1, width="fill", align="left") sound_text = Text(sound_box, font="Times New Roman", text="Sound Detection", width="fill", color=(145, 15, 15)) sound_reading_text = Text(sound_box) sound_reading_text.repeat(200, sound_detect) # flame sensor flame_box = Box(sensors_box, border=1, width="fill", align="left") flame_text = Text(flame_box, font="Times New Roman", text="Flame Detection", width="fill", color=(145, 15, 15)) falme_reading_text = Text(flame_box) falme_reading_text.repeat(200, flame_detect) app.display()
sIP = 0 sP = 0 app = App(bg="lightblue1", title="Multitriv Client", layout="grid", width=875, height=600) ippWindow = Window(app, title="Server details") inputLn = TextBox(app, grid=[0, 0], width=50) chatHist = TextBox(app, grid=[0, 1], height=29, width=110, multiline=True) ipBox = TextBox(app, grid=[0, 2], width=10, text="IP Address") portBox = TextBox(app, grid=[0, 3], width=10, text="Port") chatHist.text_color = "maroon" inputLn.text_color = "maroon" chatHist.bg = "LightSteelBlue3" inputLn.bg = "LightSteelBlue3" ipBox.bg = "LightSteelBlue3" portBox.bg = "LightSteelBlue3" def sendMsg(args): #if(event_data.key == "<Return>"): msgContents = inputLn.value inputLn.clear() s.send(msgContents.encode('utf-8')) nick = str(input("Nickname?: "))
from guizero import App, ButtonGroup, CheckBox, Combo, PushButton, Slider, Text, TextBox a = App(title="colors") text = Text(a, text="colors") check = CheckBox(a, "check me") combo = Combo(a, ["red", "blue"]) button = PushButton(a) slider = Slider(a) textbox = TextBox(a, text="or colours") a.bg = "pink" text.text_size = 30 text.font = "verdana" check.bg = "red" combo.bg = "blue" combo.text_color = "green" combo.text_size = 24 button.bg = "black" button.text_color = "white" button.font = "arial" button.text_size = 18 slider.bg = "yellow" textbox.bg = "cyan" textbox.font = "courier" textbox.text_color = "purple" a.display()
activate.width = 8 # Delete venv button delete = PushButton(app, delete_venv, text='Delete', grid=[1, 5], align='right') delete.text_size = 14 delete.bg = btn_bg delete.width = 8 """Center padding""" box = Box(app, grid=[2, 1], height='fill', width=30) """Right content""" new_label = Text(app, text='New VENV Name:', grid=[3, 1]) # New venv name texxt input new_venv_name = TextBox(app, grid=[3, 2], width=20) new_venv_name.text_size = 14 new_venv_name.bg = 'white' # Create venv button create_venv_button = PushButton(app, create_venv, text='Create venv', grid=[3, 3], align='left') create_venv_button.text_size = 14 create_venv_button.bg = btn_bg list_virtualenvs() app.display()
info_box = Box(app, layout="grid", width=408, height=100, border=False, grid=[0, 0]) #entry box and label input_label = Text(info_box, size=24, color="black", text="Enter Decimal: ", grid=[0, 0], align="right") input_box = TextBox(info_box, width=15, grid=[1, 0]) input_box.bg = "white" #to display fractions fraction_label = Text(info_box, size=24, color="black", text="Fractional Inches: ", grid=[0, 1], align="right") fraction_answer = Text(info_box, color="black", size=24, grid=[1, 1]) #radion buttons conversion_choice = ButtonGroup(info_box, options=["Inches", "MM"], command=inches_or_mm, selected="Inches",
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() #Create Name of database # #Create table called Customers # conn.execute('''DROP TABLE IF EXISTS Customers;''') # #Create table with primary key, fields and datatypes # conn.execute('''CREATE TABLE Customers # (Id TEXT PRIMARY KEY NOT NULL, # Name TEXT NOT NULL, # Dob DATE NOT NULL);''')
command=get_ip, text="Get IP Address", width=30, align="right") ip_button.text_size = 15 ipdisplay = Text(ip_box, text=" ", size=20, font="Lato", color="white") # Contains the button and TextBox for YouTube search based on entered query youtube_box = Box(app, width="fill", align="top", border=False) youtube_box.bg = "#e74c3c" search_query_box = TextBox(youtube_box, width="fill", align="left", multiline=False) search_query_box.text_size = 25 search_query_box.bg = "#dfe6e9" search_button = PushButton(youtube_box, command=search_yt_query, text="Search YouTube", align="right", width=30, height=3) search_button.text_size = 20 search_button.text_color = "white" # Contains the buttons for executing system functions buttons_box = Box(app, width="fill", layout="grid", align="top", border=False) buttons_box.bg = "#3498db" buttons_box.text_color = "white" button13 = PushButton(buttons_box, command=launch_kodi,
# print(item_list) InputBox.clear() i = len(item_list) # else: print(data.key) FoodApp = App(title="Randomizer", layout="auto", height=win_height, width=640, bg="#424242", visible=True) Box(FoodApp, width=10, height=25) Instruction = Text(FoodApp, "Type one of the options and press 'space'", size=20, color="white") Box(FoodApp, width=10, height=25) InputBox = TextBox(FoodApp) InputBox.when_key_pressed = update Box(FoodApp, width=100, height=5) answer = TextBox(FoodApp) answer.bg = "#424242" answer.textcolor = "white" answer.visible = False done = PushButton(FoodApp, command=randomizer, args=[answer], text="Randomize") FoodApp.display()
text="xxxxx", size=14, grid=[4, 5, 1, 1], align="left") textspace_center.text_color = "white" #pulse_value =Text(app, text= pulse_signal.value, size=14, grid=[4,6,1,1], align="left") #pulse_value.text_color= "black" #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])
width=100, align="right") results_box = Box(tweets_output_box, border=1, layout="grid", grid=[0, 3], height=90, width=650, align="top") add_button = PushButton(add2_box, text="Add to CSV", grid=[0, 0], height=1, width=10, align="top") tweet_textbox.bg = "white" results_box.bg = "white" add_button.bg = "lightgray" make_tweets_box.bg = "lightgray" username_box = Box(bot_box, border=0, layout="grid", grid=[3, 0], height=20, width=300, align="left") #box to type in twitter username user_text = Text(username_box, text="michaela", size=12, font="Comic Sans",
# Title = Text(window7, text="Incorrect!", color="#000000", font="Ariel", size="25", grid = [1,1]) button18 = PushButton(window7, command=DisplayTwo, text="Again?", grid=[1, 2]) button19 = PushButton(window7, command=HomePage, text="Home", grid=[3, 5]) #2 Player Title = Text(window8, text="Results", color="#000000", font="Ariel", size="25", grid=[0, 0]) button20 = PushButton(window8, command=HomePage, text="Home", grid=[3, 4]) button21 = PushButton(window8, command=DisplayTwo, text="Again?", grid=[3, 5]) #colours checkbox.bg = "White" checkbox2.bg = "White" checkbox3.bg = "White" checkbox4.bg = "White" checkbox5.bg = "White" checkbox6.bg = "White" Subbut.bg = "White" Addbut.bg = "White" button1.bg = "white" button2.bg = "white" button3.bg = "white" button4.bg = "white" button5.bg = "white" button6.bg = "white" button7.bg = "white" button8.bg = "white"
app = App(title='interfaccia-grafico') grafico_text = Text(app, text='Grafico', font = 'arial', size=40) whatever = TextBox(app, width=50, multiline=True, height=2) whatever.value='Interfaccia grafico' output = TextBox(app, width=80, height=10, multiline=True) push1 =PushButton(app, text='definire le coordinate', command=tasto0) push2 =PushButton(app, text='coordinate', command=tasto1) push3 = PushButton(app, text='grafico', command=tasto2) app.bg="#000000" grafico_text.text_color ="#FFFFFF" whatever.bg="#FFFFFF" push1.bg="#E52B50" push2.bg="#CC9966" push3.bg="#5E86C1" output.bg="#008f39" app.display()
selected_item = Combo(button_box, grid=[1, 1, 2, 1], width=15, options=items, command=update_harnes_fixture_lbl) selected_item.text_size=20 # Serial Numbers serial_label = Text(button_box, text="2. Enter - Serial Number:", size=20, grid=[0,2], align="left") serial_num_txtbox = TextBox(button_box, grid=[1, 2, 2, 1], width=17, command=update_harnes_fixture_lbl) serial_num_txtbox.text_size = 20 # User user_lbl = Text(button_box,text="3. Select - User:"******"left" ) user_lbl.when_double_clicked = double_click user_name_cmb = Combo(button_box,options=users, grid=[1,3, 2, 1], align="left", width=15) user_name_cmb.text_size=20 # Use fixture and harness harness_lbl = Text(button_box, text="4. Use Harness:", size=20, grid=[0, 4], align="left") use_harness = TextBox(button_box, enabled=True, width=17, grid=[1, 4, 2, 1]) use_harness.text_size=20 use_harness.bg = "#999999" fixture_lbl = Text(button_box, text="5. Use Fixture:", size=20, grid=[0,5], align="left") use_fixture = TextBox(button_box, enabled=True, width=17, grid=[1, 5, 2, 1]) use_fixture.bg = "#999999" use_fixture.text_size=20 # Buttons tst_btn = PushButton(button_box, command=begin_test, text = "6. Begin Test", grid=[0,6]) tst_btn.text_size = 30 tst_btn.enabled = False save_btn = PushButton(button_box, command=save_test, text = "7. Save Test", grid=[1,6]) save_btn.text_size = 30 save_btn.enabled = False graph_box = Box(app, layout="grid", grid=[6,0,6,6], border=3) noise_btn = PushButton(graph_box, command=plot_noise, image="Noise_400x300.png", grid=[0,0]) counts_btn = PushButton(graph_box, command=plot_counts, image="Counts_400x300.png", grid=[1,0])