Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

swt buttons wont right-align

 
Mark Reyes
Ranch Hand
Posts: 426
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Good Day..

I need to create a dialog box for user to enter their name and implemented gridlayout.

I divide the shell widget into 3 columns and I want the first column be occupied by the label having it left aligned. Then I merge the last two columns and wanted the two buttons place right aligned into the shell.

But my problem is, the GUI does not draws itself correctly. Here's my code.



I want the two button cmdOK and cmdCancel be right align and in level with the label.

I can't seem to have the GUI drawn as what I wanted it to look so I added a label,lblHidden in this case, set its visible property to false and occupied the last two columns. That did the trick and the button right aligned themselves correctly.

I really wanted to know why this is so and appreciate any suggestions or maybe I just miss something in my code. I hope I had explain thing clearly.. Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic