O'Reilly logo

ExtGWT Rich Internet Application Cookbook by Odili Charles Opute

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Aligning buttons

Buttons are usually placed next to each other in a horizontal fashion (rarely vertically which often requires a special layout), and by default at the middle (centre) of their section within the container they provide actions for. If we can only present buttons this way in our apps, then they'll look down-right boring no matter what they can do. Thankfully, GXT gives us more options for alignment.

Aligning buttons

How to do it...

I want to show how to snap buttons to the left-hand side or right-hand side in ContentPanel and it only takes one line to configure it.

/* * We create a content panel and size it. */ ContentPanel ctPanel = new ContentPanel(new ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required