Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Change only some properties of a MultiComboBoxItem autochild

    Hello,
    I'm trying to customize some properties of the ComboBox autochild of a MultiComboBoxItem.
    Code:
    MultiComboBoxItem item = new MultiComboBoxItem();
    
    ComboBoxItem props = new ComboBoxItem();
    props.setUseClientFiltering(false);
    props.setHint(null);
    
    item.setComboBoxProperties(props);
    The issue is that apparently the default ComboBox autochild is heavily customized inside the MultiComboBoxItem, and simply setting a new comboBoxItem as will reset all those properties.

    Getting the default properties instead of creating a new instance also does not work:
    Code:
    MultiComboBoxItem item = item.getComboBoxDefaults();
    The result is that the default MultiComboBoxItem looks like this:
    Click image for larger version

Name:	Screenshot from 2024-05-08 10-09-26.png
Views:	29
Size:	3.7 KB
ID:	272292
    But if we set the combobox properties it loses its styling and defaults:
    Click image for larger version

Name:	Screenshot from 2024-05-08 10-12-06.png
Views:	20
Size:	2.3 KB
ID:	272293

    Is there a way to only set some properties, or inherit the defaults?

    Thanks

    #2
    That API is already designed to only apply certain properties, so the fact that the styling for the combo box is somehow destroyed probably indicates some kind of invalid usage - at the skin level, or with changeDefaults(), or perhaps in CSS usage itself, such as invalid selectors.

    Try again in a clean project with a default skin and you should see the problem correct itself, then you can troubleshoot from there.

    Comment

    Working...
    X