right to left tree items

78 views
Skip to first unread message

danit ba

unread,
Feb 29, 2012, 10:32:56 AM2/29/12
to Google Web Toolkit
Hi,

I am trying to create right to left tree.
I changed the theme to the RTL theme:
<inherits name='com.google.gwt.user.theme.standard.StandardRTL'/>

and the tree seems right to left (the + is in the right side) , but
when I add sub items to the tree (TreeItem, Buttons,Labels) they are
all aligned to left.

I tried to add "direction:rtl " proprty to the css and its not
working.

any idea how to solve it?

Thanks.


this is the piece of code:

TreeItem productTreeItem[]=new TreeItem[6];
Tree productTree=new Tree();

for (int i=0; i<6; i++ )
{

Button button[]= new Button[3];
button[0]=new Button( "אאאא");
button[1]=new Button( "בבב");
button[2]=new Button( "גגגג");

button[0].addStyleName("rtl");
button[1].addStyleName("rtl");
button[2].addStyleName("rtl");
productTreeItem[i]=new TreeItem("עברית "+i);
productTreeItem[i].getElement().addClassName("rtl");

productTreeItem[i].addItem(button[1]);
productTreeItem[i].addItem(button[2]);*/
productTreeItem[i].addItem("אאא");
productTreeItem[i].addItem("בבבבב");
productTreeItem[i].addItem("גגגגגגגגג");

productTree.addItem(productTreeItem[i]);
}

Thomas Broyer

unread,
Mar 1, 2012, 4:20:05 AM3/1/12
to google-we...@googlegroups.com
AFAIK, GWT's RTL is based on the locale. Did you try setting the locale to an RTL one?
E.g.
<extend-property name="locale" value="he" />
<set-property name="locale" value="he" />
<set-property-default name="locale" value="he" />
Reply all
Reply to author
Forward
0 new messages