MicroGui: Set visible button in Buttonlist stack
Posted: Sun May 15, 2022 7:08 am
Good Afternoon,
Using MicroGui with ESP32 with PSRAM and ILI9341 display
I am trying to algorithmically set the visible button in a buttonlist stack.
Firstly, is it possible? it seems to me that .value should allow me to do this
"value Optional args button=None, new_cb=False. The button arg, if provided, should be a button in the set. If supplied and the button is not active the currency changes to the supplied button, which is displayed. By default the callback of the previous button is run, otherwise the callback of the newly displayed button."
But what is the name of the button in the set if the buttons have been created by .add_button?
my code
lightswitch[z] = ButtonList(my_callbacktest)
for t in btable:
lightswitch[z].add_button(wri, slocation[z][1]+15, labcol-6, shape=RECTANGLE, height=16, width=16, text=slocation[z][0], **t)
Thank you for your consideration.
Cheers
Barry
Using MicroGui with ESP32 with PSRAM and ILI9341 display
I am trying to algorithmically set the visible button in a buttonlist stack.
Firstly, is it possible? it seems to me that .value should allow me to do this
"value Optional args button=None, new_cb=False. The button arg, if provided, should be a button in the set. If supplied and the button is not active the currency changes to the supplied button, which is displayed. By default the callback of the previous button is run, otherwise the callback of the newly displayed button."
But what is the name of the button in the set if the buttons have been created by .add_button?
my code
lightswitch[z] = ButtonList(my_callbacktest)
for t in btable:
lightswitch[z].add_button(wri, slocation[z][1]+15, labcol-6, shape=RECTANGLE, height=16, width=16, text=slocation[z][0], **t)
Thank you for your consideration.
Cheers
Barry