EduardoElias Well-Known Member Licensed User Longtime User Jul 16, 2017 #1 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
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
fixit30 Active Member Licensed User Longtime User Jul 16, 2017 #2 Make Panels(30) asPanel a global variable. Then later you can: Code: Copy Dim pnl as Panel = panels (10) Upvote 0
Make Panels(30) asPanel a global variable. Then later you can: Code: Copy Dim pnl as Panel = panels (10)
EduardoElias Well-Known Member Licensed User Longtime User Jul 17, 2017 #3 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
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
Erel B4X founder Staff member Licensed User Longtime User Jul 17, 2017 #4 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
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.