PDA

View Full Version : Buttons at left and right



blay
26 Dec 2010, 8:44 AM
Hello:

I wanna add some buttons to a ContentPanel aligned to left and other ones aligned to right. But they all are aligned to the last contentPanel.setButtonAlignment(HorizontalAlignmet.X) in code. Is there any way to do this?

Thanks

sven
26 Dec 2010, 9:23 AM
There is a FillToolItem you can use for this. Use left aligning with a FillToolItem.

blay
26 Dec 2010, 11:59 AM
Ok, but that works using a ToolBar as bottomComponent of the content panel...but the visual aspect isntĀ“the same as if we just add the buttons by "contentPanel.addButton()". Is that the unique way to achieve that?

Thanks

sven
27 Dec 2010, 2:22 AM
Works also for the button bar, as its also a toolbar.
contentPanel.getButtonBar().add(new FillToolItem());

blay
27 Dec 2010, 3:31 AM
Oh, sure, thanks Sven.