-
FEATURED COMPONENTS
First time here? Check out the FAQ!
1 | initial version | |
Hi, I noticed that the only way to programmatically (java) uncheck the checkmark on listbox header is to remove all listitems from the listbox:
for (Iterator<component> itemIterator = listbox.getChildren().iterator(); itemIterator.hasNext();) {
Component item = itemIterator.next();
if (!((item instanceof Listhead) || (item instanceof Auxhead) || (item instanceof Listfoot))) {
itemIterator.remove();
}
}
The problem is that if listbox has no listitems, I can't uncheck the checkmark. As a workaround, I add a not visible listitem, so the listbox is never empty. Is there a better way to
2 | No.2 Revision |
Hi, I noticed that the only way to programmatically (java) uncheck the checkmark on listbox header is to remove all listitems from the listbox:
for (Iterator<component> itemIterator = listbox.getChildren().iterator(); itemIterator.hasNext();) {
Component item = itemIterator.next();
if (!((item instanceof Listhead) || (item instanceof Auxhead) || (item instanceof Listfoot))) {
itemIterator.remove();
}
}
The problem is that But if the listbox has no listitems, I can't uncheck the checkmark.
As a workaround, I add a not visible listitem, so the listbox is never empty.
Is there a better way toto accomplish this?