Hi David,
You can use check box as a renderer in the list, e.g.:
ULCList list = new ULCList(new Object[] {new Boolean(true), new
Boolean(false) });
list.setCellRenderer(new CheckBoxRenderer());
public class CheckBoxRenderer extends ULCCheckBox implements
IListCellRenderer {
public CheckBoxRenderer() {
setHorizontalAlignment(ULCCheckBox.CENTER);
}
public IRendererComponent getListCellRendererComponent(ULCList list,
Object value,
boolean isSelected, boolean
hasFocus, int row) {
setForeground(isSelected ? list.getSelectionForeground() :
list.getForeground());
setBackground(isSelected ? list.getSelectionBackground() :
list.getBackground());
this.setText(value.toString());
return this;
}
}
I hope this helps.
Thanks and regards,
Janak
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Thunder, David
Sent: Thursday, February 01, 2007 6:15 PM
To: [email protected]
Subject: [ULC-developer] Help with implementing a checkListbox in ULC?
Is there an easy method to implement a Check List box in ULC?
This would be a list box with txt, containing a check box that can be
queried for true or false;
Is the best solution to create a Table with a scroll pane, having a check
box in one column, and the text in another?
David Thunder
Programmer Analyst
Macomb Intermediate school system
[EMAIL PROTECTED]
_______________________________________________
ULC-developer mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/ulc-developer