Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from guizero import*
- app = App(title = "Appointment")
- # Function definitions
- def make_appointment():
- #info("Greetings", "your chosen day is: " + days )
- appointment = bgp_days.value
- slider = sl_date.value
- month = lb_month.value
- lbl_output.value = "You have chosen " + appointment + " " + str(slider) + " " + month
- lbl_output.bg = "purple"
- lbl_output.text_color = "white"
- def slider_changed(slider_value):
- sl_date.value = slider_value
- #GUI widgets
- box3 = Box(app, align="top", width="fill", height = 50, border=1)
- box = Box(app, align="bottom", width="fill", height = 150, border=1)
- box1 = Box(app, align="left", width="250", height = 200, border=1)
- box2 = Box(app, align="right", width="300", height = 200, border=1)
- message = Text(box1, text="Enter a Month?", color="black")
- lb_month = ListBox(
- box1,
- items=["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
- selected="black",
- scrollbar=True)
- message0 = Text(box3, text = "Appointments")
- message1 = Text(box, text = "what date would you prefer?")
- sl_date = Slider(box, start = 1, end = 31, command = slider_changed)
- lbl_output = Text(box, text="You have chosen...")
- message2 = Text(box2, text = "Which is your prefered day?")
- bgp_days = ButtonGroup(box2, options =["Monday", "Tueday", "Wednesday", "Thursday", "Friday"], selected="none")
- #event triggers
- btn_make_appointment = PushButton(box, text='display days', command = make_appointment )
- # Show the GUI on the screen, start listening to events.
- app.display()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement