Cadenzo Active Member Licensed User Longtime User Feb 16, 2019 #1 Thanks for the cross plattform dialogs. I really was waiting for it. Here three ideas: 1. The .SelectedItem property in B4XListTemplate (B4XDialog) seems to be only readable after the user action. It would be good, if you could also set a defaut item with that before the user action. 2. Also a integer property .SelectedIndex, to get and set the selected item position (if it is not .AllowMultiSelection) would be very usefull. 3. And beside .MultiSelectionMinimum it could also be .MultiSelectionMaximum. If it is set to 1, I could create a SingleSelection dialog with default selected item, acceptable just with "OK" or changable, very usefull.
Thanks for the cross plattform dialogs. I really was waiting for it. Here three ideas: 1. The .SelectedItem property in B4XListTemplate (B4XDialog) seems to be only readable after the user action. It would be good, if you could also set a defaut item with that before the user action. 2. Also a integer property .SelectedIndex, to get and set the selected item position (if it is not .AllowMultiSelection) would be very usefull. 3. And beside .MultiSelectionMinimum it could also be .MultiSelectionMaximum. If it is set to 1, I could create a SingleSelection dialog with default selected item, acceptable just with "OK" or changable, very usefull.
Erel B4X founder Staff member Licensed User Longtime User Feb 17, 2019 #2 You can preselect an item with this code: Code: Copy Dim rs As ResumableSub = Dialog.ShowTemplate(ListTemplate, "", "", "Cancel") Dim Selected As Int = 3 '4th item ListTemplate.CustomListView1.GetPanel(Selected).Color = ListTemplate.SelectionColor Wait For (rs) Complete (Result As Int) (Tested in B4J)
You can preselect an item with this code: Code: Copy Dim rs As ResumableSub = Dialog.ShowTemplate(ListTemplate, "", "", "Cancel") Dim Selected As Int = 3 '4th item ListTemplate.CustomListView1.GetPanel(Selected).Color = ListTemplate.SelectionColor Wait For (rs) Complete (Result As Int) (Tested in B4J)