B4J Question How to force CheckBoxCombo to sequence your selection?

Mashiane

Expert
Licensed User
Longtime User
Hi there

I'm using a CheckBoxCombo controls and this has to be for a sort order. Thing is, it displays per items added to it irrespective of your "check" sequence. For example, I want to check these items in sequence, three, one and two, and it always displays one,two,three?

Any ideas please?

CheckBoxCombo.gif


Thanks
 

Daestrum

Expert
Licensed User
Longtime User
I don't think it is possible, looking at the java code for CheckComboBoxSkin, it simple reads the items from 0 .. n, if they are set it adds to the text using a StringBuilder.
 
Upvote 0

MarkusR

Well-Known Member
Licensed User
Longtime User
i not like this comboboxes, its better to have a textfield + button and at button click you do something.
open a form with search/filter/(multi)select etc. and at close you write it as you wish info your textfield.
for the list you can use a TableView and for the data a Type Item(Checked,SortNo,Name)

other idea with CheckBoxCombo is to rename the list item with [1] at checked in changed event
and start .Sort but this will confuse the user.

or you need to compare the GetCheckedIndices before/after changed and build your own selection order list
 
Last edited:
Upvote 0
Top