kimstudio Active Member Licensed User Longtime User May 12, 2022 #1 I use following code to set items of ChoiceBox Cbx001 in AppStart, Cbx001 is on the form using designer. It is much slower than I expect as I though it should be no time, but I can see the form appears for around 2 seconds. Is this the right way to set items? Thanks. B4X: Copy Dim lst As List lst.Initialize For i = 60 To 240 lst.Add(i) Next Cbx001.Items.AddAll(lst) Cbx001.SelectedIndex = 2
I use following code to set items of ChoiceBox Cbx001 in AppStart, Cbx001 is on the form using designer. It is much slower than I expect as I though it should be no time, but I can see the form appears for around 2 seconds. Is this the right way to set items? Thanks. B4X: Copy Dim lst As List lst.Initialize For i = 60 To 240 lst.Add(i) Next Cbx001.Items.AddAll(lst) Cbx001.SelectedIndex = 2
Erel B4X founder Staff member Licensed User Longtime User May 12, 2022 #2 Try it with Combobox (=B4XComboBox). Upvote 0
kimstudio Active Member Licensed User Longtime User May 12, 2022 #3 Thanks Erel. Combobox does show in almost no time! however I like the style of choicebox and found it is hard to style the combobox, the dropdown lists are very different between choice and combo. Upvote 0
Thanks Erel. Combobox does show in almost no time! however I like the style of choicebox and found it is hard to style the combobox, the dropdown lists are very different between choice and combo.
Erel B4X founder Staff member Licensed User Longtime User May 13, 2022 #4 ComboBox is more efficient as it doesn't create UI elements for each item. Upvote 0