The Source for Java Technology Collaboration

Home » java.net Forums » Mobile & Embedded » LWUIT

Thread: How to change the "background selection color" of the command list

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
This question is not answered. Helpful answers available: 2. Correct answers available: 1.

Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 1 - Last Post: Sep 30, 2008 5:33 AM by: Shai Almog
lgmcben

Posts: 13
How to change the "background selection color" of the command list
Posted: Sep 30, 2008 4:21 AM
 
  Click to reply to this thread Reply

I'm trying to change the "background selection color" of the command list

eg. the popup menu of back, help, about, next, ...... that appear when I click on a "Menu" command.

The Menu command is a result of adding more than 2 commands to a form.

The background highlighting color just won't change. I tried using resource editor to modify these combination of values:

component: CommandList, Menu, SoftButton
attribute: bgColor, bgSelectionColor, fgColor, fgSelectionColor, transparency

The result just won't change to the way I want. (I only want to change the background hilight color of the selected command)

But...

When I modify the 'Global' value of "bgSelectionColor", the hilight change. Hurray!! but... this affect all of my component.

So, I think the value I need is "bgSelectionColor"... but for which component? -_-'

Thank you in advance.

Shai Almog
Re: How to change the "background selection color" of the command list
Posted: Sep 30, 2008 5:33 AM   in response to: lgmcben
  Click to reply to this thread Reply

Label.

The menu is a list hence the component within the list is the default
cell renderer.
The default cell renderer doesn't have its on UIID and so it uses the
Label UIID which it derives. To replace that you can replace the menu
renderer with any renderer you want that carries any UIID style you
desire.

> I'm trying to change the "background selection color" of the
> command list
>
> eg. the popup menu of back, help, about, next, ...... that appear
> when I click on a "Menu" command.
>
> The Menu command is a result of adding more than 2 commands to a form.
>
> The background highlighting color just won't change. I tried using
> resource editor to modify these combination of values:
>
> component: CommandList, Menu, SoftButton
> attribute: bgColor, bgSelectionColor, fgColor, fgSelectionColor,
> transparency
>
> The result just won't change to the way I want. (I only want to
> change the background hilight color of the selected command)
>
> But...
>
> When I modify the 'Global' value of "bgSelectionColor", the hilight
> change. Hurray!! but... this affect all of my component.
>
> So, I think the value I need is "bgSelectionColor"... but for which
> component? -_-'
>
> Thank you in advance.
> [Message sent by forum member 'lgmcben' (lgmcben)]
>
> http://forums.java.net/jive/thread.jspa?messageID=302512
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>

Shai Almog
http://lwuit.blogspot.com/

[att1.html]





 XML java.net RSS