I'm pretty new to python & coding and i'm currently experimenting with guizero to make some basic dashboards. My question is: How do i change the top menu bar of an App in guizero? Is this even possible?
Thank you in advance.
My code:
from guizero import App, PushButton, Text, Box
def dashboard():
# Dashboard settings
dashboard = App(title="Dashboard", width=320, height=320)
dashboard.bg = grey
# Title & title box
title_box = Box(dashboard, align="top", border=True)
title = Text(title_box, text="Dashboard", size=30)
title.text_color = orange
# Led status display
status_box = Box(dashboard, align="top", border=True)
status1 = Text(status_box, align="left", text="Status Led 1")
status1.bg = white
status1.size = 15
status_box1 = Box(dashboard, align="top", border=True)
status2 = Text(status_box1, text="Status Led 2")
status2.bg = white
status2.size = 15
status_box2 = Box(dashboard,align="top", border=True)
status3 = Text(status_box2, text="Status Led 3")
status3.bg = white
status3.size = 15
# Status Pushbuttons
status_pushbutton = Box(dashboard,align="bottom", border=True)
status_button = Text(status_pushbutton, text="Status Pushbutton 3")
status_button.bg = white
status_button.size = 15
status_pushbutton1 = Box(dashboard, align="bottom", border=True)
status_button1 = Text(status_pushbutton1, text="Status Pushbutton 2")
status_button1.bg = white
status_button1.size = 15
status_pushbutton2 = Box(dashboard, align="bottom", border=True)
status_button2 = Text(status_pushbutton2, text="Status Pushbutton 1")
status_button2.bg = white
status_button2.size = 15
dashboard.display()
You do not even have a menu bar so what do you mean? P.s You should not put 'dashboard = App' inside a function. You have also not added any ' ' or " " around you color names.