How do i set border color to container?

349 views
Skip to first unread message

venk...@spurtreetech.com

unread,
Dec 19, 2013, 6:43:17 AM12/19/13
to codenameone...@googlegroups.com
Hi All,

I Created one container i want to set green border to that container. So how i can i achieve that please give some suggestions.

Thanks,
Venkat

CODENAME1

unread,
Dec 19, 2013, 7:48:40 AM12/19/13
to codenameone...@googlegroups.com, venk...@spurtreetech.com
U can set the border color in the GUI... in the GUI - select the component (say Container- Click EDIT-in the border tab u can select type as Line as choose the color Green)..
 

venk...@spurtreetech.com

unread,
Dec 19, 2013, 8:14:42 AM12/19/13
to codenameone...@googlegroups.com, venk...@spurtreetech.com
HI
Thanks for quick response. But i want through programatically so how can i achieve.

Container container = new  Container();
container.setBorder();

Like this type of methods available?

Shai Almog

unread,
Dec 19, 2013, 1:09:20 PM12/19/13
to codenameone...@googlegroups.com, venk...@spurtreetech.com
Hi,
you can use the theme designer with a handcoded application. It is MUCH easier. I suggest going over some of the tutorials e.g.: http://www.codenameone.com/how-do-i---create-a-simple-theme.html
Regardless see the Border class it has many methods in it that you can use.

venk...@spurtreetech.com

unread,
Dec 20, 2013, 5:24:14 AM12/20/13
to codenameone...@googlegroups.com, venk...@spurtreetech.com


  say  Container name is tempContainer. We can set as follows

  tempContainer.getStyle().setBorder(Border.createLineBorder(1));

 Venkat.
Reply all
Reply to author
Forward
0 new messages