I have to use Labels at different locations on multiple screens. And they all are going to hold the same text.
For that I created a component and made the duplicate Labels as needed. Now, I want to update the text of all labels belong to particular component at once through code.
Please help to achieve that.
- SquareLine Studio version: 1.3.1
For this your require only one label and move it between screens on load.
Ofcourse in code, Squareline dont support load screen management, only setup event for this.
Use more or components is waste resources.
Well, I’m able to change their text values at once from SLS but don’t know how to do it from the code.
@kisvegabor can you help on this?
From code the only option is call
lv_label_set_text on all instances.
For change you need use get child
lv_label_set_text(ui_comp_get_child(labelcomp, UI_COMP_PANELMENU1_LABEL5),"Service mode BR");
So, I’m stuck with similar problem.
I want to display notification bar on top of all the screens and have to globally update multiple widgets corresponding to notification bar at once.
It won’t be good approach to manually update notification bars on all screens.
What approach do you suggest?
As i write before, create only one bar and on every screen change parent of bar in onload func. Simple explain create bar on screen1 and all other leave black place for this bar. On screen switching is ONE bar moved to new showe screen.
Thanks for replying!
It’s working. Now I’ll have to change the parent of the panel and load the screen manually. Earlier I was changing screens directly via SLS.
Hoping SLS team to get this feature added.
SLS have this event type … create event on screen call user func …
Already doing the same way.
Calling this from an Event-
I say about this
I didn’t know about this. Thanks.