CheckComboBox does not signify that item(s) have been selected

Issue #834 new
FanFeeds
created an issue

This corresponds to Pull Request #666 where the ability to select a Title/Prompt Text for the CheckComboBox was added.

With the addition of this feature, the title remains fixed even if there are item(s) selected, so there is no way of knowing if an item has been selected.

Some proposed solutions:

The way that it was before, with the item(s) showing and any text that was cut off being replaced with an ellipses. For example:

[Pizza, Hot Do...]

[Dog, Cat, Sna...]

[Plumber, Cler...]

Another proposed solution was to display the amount of item(s) that have been checked off. For example:

[3 of 3]

[4 of 7]

[5 of 6]

If no consensus can be reached, or for the sake of having different choices, perhaps the developer can be allowed to decide, via a method such as .setDisplayOption(Display.ITEMTEXT), which display to use?

Comments (3)

  1. Stefano Negri

    What about adding to the fixed title the information of how many items are checked?

    Like:

    [Food (3 of 3)]

    [Animals (4 of 7)]

    [Jobs (5 of 6)]

    If one wants to see the items' names instead of "fixed title + count" they could always add a listener to

    CheckComboBox.getCheckModel().getCheckedIndices()
    

    where if the number of checked indices is > 0 they set the title to null (by doing so the list of names will be used), and if the number of checked indices is = 0 they set the title to the fixed string

  2. FanFeeds reporter

    I like that idea, @Stefano!

    Just one question: will the ellipses option be available in case the text doesn't fit the width of the combo box? That'd be great if it were available.

    Sorry for the late response, by the way.

  3. Log in to comment