RauchG Active Member Licensed User Longtime User Jul 8, 2016 #1 Hello, thanks to Klaus, DonManfred and Johan Schoeman. I use the "Custom listview" by Klaus and I would like to have a "multi select spinner". Klaus refers to the "B4EXCEPT guide/12.4.2 Adding a custom view by code" I then the class module/custom view is created. Code: Public Sub AddToParent(Parent As Panel, Left As Int, Top As Int, Width As Int, Height As Int) mBase.Initialize("mBase") mBase.Color = Colors.Green Parent.AddView(mBase, Left, Top, Width, Height) End Sub So I create a panel on the custom list view. Code: clsTest2.AddToParent(P, 2dip, 83dip, 338dip, 48dip) How can i now on the new panel of the custom list view a "multi-select spinner" view or in place of the new panel just a "multi-select spinner" Thank you for your help. greeting RauchG Translated with "babylon"
Hello, thanks to Klaus, DonManfred and Johan Schoeman. I use the "Custom listview" by Klaus and I would like to have a "multi select spinner". Klaus refers to the "B4EXCEPT guide/12.4.2 Adding a custom view by code" I then the class module/custom view is created. Code: Public Sub AddToParent(Parent As Panel, Left As Int, Top As Int, Width As Int, Height As Int) mBase.Initialize("mBase") mBase.Color = Colors.Green Parent.AddView(mBase, Left, Top, Width, Height) End Sub So I create a panel on the custom list view. Code: clsTest2.AddToParent(P, 2dip, 83dip, 338dip, 48dip) How can i now on the new panel of the custom list view a "multi-select spinner" view or in place of the new panel just a "multi-select spinner" Thank you for your help. greeting RauchG Translated with "babylon"
Erel B4X founder Staff member Licensed User Longtime User Jul 10, 2016 #2 See the CustomListView example: https://www.b4x.com/android/forum/t...xible-list-based-on-scrollview.19567/#content Change Button1_Click sub to: Code: Sub Button1_Click Dim checkedItems As List checkedItems.Initialize For i = 0 To clv2.GetSize - 1 Dim p As Panel = clv2.GetPanel(i) Dim chk As CheckBox = p.GetView(2) If chk.Checked Then checkedItems.Add(clv2.GetValue(i)) End If Next Log("Checked items: " & checkedItems) End Sub It will create a list with all the checked items. Upvote 0
See the CustomListView example: https://www.b4x.com/android/forum/t...xible-list-based-on-scrollview.19567/#content Change Button1_Click sub to: Code: Sub Button1_Click Dim checkedItems As List checkedItems.Initialize For i = 0 To clv2.GetSize - 1 Dim p As Panel = clv2.GetPanel(i) Dim chk As CheckBox = p.GetView(2) If chk.Checked Then checkedItems.Add(clv2.GetValue(i)) End If Next Log("Checked items: " & checkedItems) End Sub It will create a list with all the checked items.
RauchG Active Member Licensed User Longtime User Jul 10, 2016 #3 Hello Erel, thank you for your reply. To your custom list view" can i get the "Multi-select spinner" of DonManfred. So I can now continue to work. Greeting RauchG Attachments CustomListViewRh.zip CustomListViewRh.zip 11.3 KB · Views: 435 Upvote 0
Hello Erel, thank you for your reply. To your custom list view" can i get the "Multi-select spinner" of DonManfred. So I can now continue to work. Greeting RauchG