It' s possible to make a alternate bicolor list?

32 views
Skip to first unread message

esal...@xirectss.com

unread,
Dec 26, 2013, 10:39:53 AM12/26/13
to codenameone...@googlegroups.com
 create a class extends container implements ListCellRenderer. In this metod getListCellRendererComponent I use a conditional with mod operator to simulate status. So when result it is == 0 renderer's bgColor(0xff0000) otherwise bgColor (0x0000ff) As a result I have my list with only the last color setted.

Shai Almog

unread,
Dec 26, 2013, 2:27:20 PM12/26/13
to codenameone...@googlegroups.com, esal...@xirectss.com
There is even an option for it in the GUI builder (pinstripe). You need to disable a List optimization in order to get this to work though:
List.setMutableRendererBackgrounds(true);


Reply all
Reply to author
Forward
0 new messages