Android Question Is a list able to keep panels properties ?

DALB

Active Member
Licensed User
Hello eveyone.

Technical question about "what can a list do ?"

Is a list able to store panels like this : list.add(panel(i))

if yes, are all the properties of each panel stored in the list enabled or not ?
I ask this to know if I can call any panel with it all properties in my code from the list.

I wish to do a project, but I want to be sure that this can run or not, and I wish to know if someone did this.

Thank you
 

LucaMs

Expert
Licensed User
Longtime User
Hello eveyone.

Technical question about "what can a list do ?"

Is a list able to store panels like this : list.add(panel(i))

if yes, are all the properties of each panel stored in the list enabled or not ?
I ask this to know if I can call any panel with it all properties in my code from the list.

I wish to do a project, but I want to be sure that this can run or not, and I wish to know if someone did this.

Thank you
You could do a simple-little test, before starting your "official app".

Anyway, yes, a List can store Panels, although an array can be better, in this case.

If you store Panels in a List, then you have to do something similar to this:
B4X:
Dim pnl As Panel = lstPanels.Get(x)
' here you have all the pnl properties available.

If you use an array:
B4X:
Dim Panels(7) As Panels
Panels(3).Width = xxx

Lists or Arrays "containing" Panels must be declared in Sub Globals.
 
Last edited:
Upvote 0

DALB

Active Member
Licensed User
Thanks Lucas
In your explanation, when you extract a panel with 'lstPanels.Get(x)'
You only have the panel, but its properties have to be stored in a other list, like width, sub panels, height, etc...
Is that right ?

hmmm ! regarding to your first example, it seems true ! But i'll try !
 
Upvote 0

DALB

Active Member
Licensed User
Yes, it works, thank you ! I can get all the properties of each panel. It saves me a lot !
mille grazzie si posso scrivare come questa la !
 
Upvote 0
Top