You have a typo in your style names. "grid-column-aliggn-right" in java
and "grid-column-align-right" in css.

You could also:

risul.setHorizontalAlignment(0, 3, HasHorizontalAlignment.ALIGN_RIGHT);

Paul



Engidea-GWT wrote:
> Dammed Microsoft... it works on IE (old one) but not on Opera or
> Firefox, so I must say it is NOT solved.
> Sorry
>
>
> On Apr 9, 4:16 pm, Engidea-GWT <[email protected]> wrote:
>   
>> Hi everybody
>> I was looking on how to align right an element on a table and I found
>> out that it is possible to align right a column.
>> It is ok for what I wish to do and I am sharing the "solution".
>> Assume you have some code like this one
>>
>>     Grid risul = new Grid(1,4);
>>     risul.setWidth("100%");
>>     risul.getColumnFormatter().addStyleName(3,"grid-column-aliggn-
>> right");
>>
>>     risul.setWidget(0,0,newRegistaWebItem());
>>     risul.setWidget(0,1,newVersionItem());
>>     risul.setWidget(0,2,newWebUserItem());
>>
>>     AbstractImagePrototype logoff = stat.toolbarImages.newLogoff();
>>     risul.setWidget(0,3,logoff.createImage());
>>
>> if you add a css rule like this one
>>
>> .grid-column-align-right
>>   {
>>   text-align: right;
>>   }
>>
>> You will have as a result that the elements of the last column align
>> right.
>> GWT Gurus, if there is a better way please let us know ! thanks !
>>
>> P.S. I did try to attach a reply on the many post regarding Grid
>> element align right but I could not

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to