Skip to main content

Why Form BGColor not working?

3 replies [Last post]
bhakki
Offline
Joined: 2009-09-09
Points: 0

Hi,

I given a Form BGColor on ResourceEdit#UnSelectedStyle. But Form BGColor not showing on the emulator. What the issue? Im using current svn repository.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
vprise
Offline
Joined: 2003-11-07
Points: 0

I'm guessing you made the ContentPane opaque or chose a different background (e.g. gradient etc.) but we would need more details.

bhakki
Offline
Joined: 2009-09-09
Points: 0

See this simple code.

Display.init(this);
Resources r = Resources.open("/calendar.res");
UIManager.getInstance().addThemeProps(r.getTheme(r.getThemeResourceNames()[0]));
Form form = new Form("Sample form");
form.setLayout(new BoxLayout(BoxLayout.Y_AXIS));
form.addComponent(new Label("Sample Label");
form.show();

In resource edit, I just added the Form#Color#Background on unselected tab. But on the screen BGColor not showing. Why?

Suppose i given the BGColor through coding means its showing properly. For example, form.getStyle().SetBgColor(0x111111);

FYI: I wont anything to resource edit. Im using current version of LWUIT and ResourceEdit.

vprise
Offline
Joined: 2003-11-07
Points: 0

I think its because you used addThemeProps instead of setThemeProps