Android Question Working with LoadLayout and Array

EduardoElias

Well-Known Member
Licensed User
Longtime User
I have:

Dim Panels(30) as Panel

Then I do a loop:

for i = 0 to 29
Panels(i).Initialize("")
Panels(i).LoadLayout("1.bal")

... access directly the Labels and other objects from the LoadLayout before the next loop

Next

Inside this Layout there are labels and customgridview

The thing is, how can access AGAIN like the Panels(10) ? I want to change ou interact with the CustomGridView that is part of that Panels(10)

Thanks
 
So, getting the panel from the array, does not bring me back the children of the panel that are the CustomListView and other labels

I want to interact with this CustomListView
 
Upvote 0
Please use [code]code here...[/code] tags when posting code.

CustomListView instances are not views. You will not find them by calling Panel.GetAllViewsRecursive. You will only find the ScrollView that is added.
One simple solution is to use the Tag property to store a reference to the CustomListView:
Code: Copy
Panels(i).LoadLayout(...)
Panels(i).Tag = CustomListView1

If you need to store multiple CLVs then use a custom type.

I recommend you to use a List instead of an array. It is more flexible.
 
Upvote 0
Back
Top