Skip to main content

List Itens Problem

2 replies [Last post]
seik
Offline
Joined: 2008-07-03
Points: 0

Hello!
Well, I'm having a problem with adding a Style on a List.
What I want is to change 2 things on the list:
1- The char colors while selected (in default they became white, it gets hard to read, so I want to change its color to black or any darker color)
2- The background of the selected item (in default its a light green, if I can change it to white or some other color it will help a lot)

I tried applying on the List an Style with:
bgColor(0xffffff)
bgSelectedColor(0xccccff)
fgColor(0x000000)
fgSelectedColor(0xccccff)

but in the end only the List's background changed, the selected item background and text didn't change, so can someone give me a light on this matter?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
seik
Offline
Joined: 2008-07-03
Points: 0

Wow!! So fast!!! Never expected to get a reply this fast!
Thanks a lot! I tested it right now (your sollution) and its working great!
Thanks again, if I have any other problem I may trouble you again ^^

Shai Almog

Hi,
apply these styles on an instance of DefaultCellRenderer and set it
to be the renderer of the list. For more information look at the
LWUIT Demo source code and at the "Renderers" demo within that code.

Thanks,
Shai.

> Hello!
> Well, I'm having a problem with adding a Style on a List.
> What I want is to change 2 things on the list:
> 1- The char colors while selected (in default they became white, it
> gets hard to read, so I want to change its color to black or any
> darker color)
> 2- The background of the selected item (in default its a light
> green, if I can change it to white or some other color it will help
> a lot)
>
> I tried applying on the List an Style with:
> bgColor(0xffffff)
> bgSelectedColor(0xccccff)
> fgColor(0x000000)
> fgSelectedColor(0xccccff)
>
> but in the end only the List's background changed, the selected
> item background and text didn't change, so can someone give me a
> light on this matter?
> [Message sent by forum member 'seik' (seik)]
>
> http://forums.java.net/jive/thread.jspa?messageID=284190
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net