I have defined the check /uncheck image for checkbox ( in the GUI bilder
constants) . When i use the checkbox in the GUI builder. It shows
corectly(the unselcted/pressed/selected state). BUt when i try to manually
add the checkbox (setting the same UIID as the GUI builder checkbox), the
look is different.
I have attached the screen shot. Both the checkbox are in the pressed
state.
The top checkbox is directly added in the GUI. and the second
checkbox(black background - seems to be the default style) is added from
the code.
CheckBox cb
= new CheckBox();
cb.setSelected(true);
cb.setEnabled(true);
cb.setName(h.getChildAt(i).getAttribute("Name"));
cb.setText(h.getChildAt(i).getAttribute("Name"));
cb.setUIID("SettingsCheckBox"); //UIID is same as set in the gui checkbox
cb.setGap(10);
((Button)cb).addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent evt) {
}
});
HOw to remove the default style from the second checkbox
--
You received this message because you are subscribed to the Google Groups
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit
https://groups.google.com/d/msgid/codenameone-discussions/504e4b26-5a47-464e-a51c-d3b78c1bfa77%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.