Ans Needed
Ans Needed

Reputation: 31

Horizontal Alignment GWT VerticalPanel

VerticalPanel panel = new VerticalPanel(); panel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);

The above is not left aligning the Tree widget I am adding to this panel. Any ideas on how I can left align the Tree widget?

Upvotes: 1

Views: 2328

Answers (2)

wonu wns
wonu wns

Reputation: 3608

i thought that the default alignment for any components is left alignment :) (correct me if i'm wrong.) anyways, here it goes:

panel.setCellHorizontalAlignment(treeWidget, HasHorizontalAlignment.ALIGN_LEFT);

and you can also do this in UiBinder by:

<g:cell horizontalAlignment="ALIGN_LEFT">
   <g:VerticalPanel>
   ...
   </g:VerticalPanel>
</g:cell>

Upvotes: 2

bNd
bNd

Reputation: 7630

Try with

panel.setHorizontalAlignment(HasAlignment.ALIGN_LEFT);

Upvotes: 0

Related Questions