Good evening,
I need a tip on how to realise my project.
I am building a screen with controls elements.
These controls are created by the respective class.
I just get the pane from the class and insert it in the main form
This also works very well so far. But maybe the wrong way?
Now I have to update some elements that are currently displayed every 5 seconds.
Because i dont want to built the whole screen every 5s again.
I have given each class an update function.
I think the problem is that i cant add the class instance as a node, only its pane
How can I call this function for each individual element?
I need a tip on how to realise my project.
I am building a screen with controls elements.
B4X:
For Each element As Map In screenelements.Values
If element.ContainsKey("Type") Then
Select element.Get("Type")
Case "ScreenButton"
Dim sb As ScreenButton
sb.Initialize("ScreenButton",p.x1,p.y1,p.x2,p.y2,element.Get("Nr"))
MainForm.RootPane.AddNode(sb.Base,p.x1,p.y1,p.x2,p.y2)
Case ...
End Select
End If
Next
These controls are created by the respective class.
I just get the pane from the class and insert it in the main form
This also works very well so far. But maybe the wrong way?
Now I have to update some elements that are currently displayed every 5 seconds.
Because i dont want to built the whole screen every 5s again.
I have given each class an update function.
I think the problem is that i cant add the class instance as a node, only its pane
How can I call this function for each individual element?
Last edited: