If you are experiencing an issue please mention the full platform your
issue applies to:
IDE: NetBeans/Eclipse/IDEA NetBeans 8.2
Desktop OS Windows 10 Pro
Simulator Latest
Device PC, Android & IOS
I am looking to set the selected Color of a Tab (Tabs Object) when selected.
I set the selected ForeGround color to say Green
However the Selected Tab does not change color when selected so there is no
visual way to see which tab has been selected.
I am using this model:
Tabs tb = new Tabs(Component.TOP) {
@Override
protected Component createTab(String title, Image icon) {
SpanButton custom = new SpanButton(title);
custom.setIcon(icon);
custom.setUIID("Container");
custom.setTextUIID("Tab");
custom.setIconPosition(BorderLayout.NORTH);
custom.setIconUIID("Tab");
return custom;
}
@Override
protected void setTabSelectedIcon(Component tab, Image
icon) {
((SpanButton) tab).setPressedIcon(icon);
}
protected void selectTab(Component tab) {
}
@Override
protected void bindTabActionListener(Component tab,
ActionListener l) {
((SpanButton) tab).addActionListener(l);
}
};
tb.setTabUIID(null);
I have changed the custom.setUIID("Container"); to a theme where selected
foreground is green, where unselected is black
As described in the
documentation: https://www.codenameone.com/blog/tip-customize-tabs-behavior.html
Regards
--
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/5d803ec3-a3c6-49dc-a278-f4dac936922f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.