| Center text on a Label with a background Image [message #768817] |
Tue, 20 December 2011 16:35  |
drew frantz Messages: 331 Registered: July 2009 |
Senior Member |
|
|
I am trying to center text on a label that contains a backgroundImage
Label l = new Label(container, SWT.CENTER) ;// also tried
SWT.CENTER|SWT.VERTICAL
l.setBackgroundImage("foo.png");
l.setText("My Text ");
l.setFont(myFont);
seems simple enough, but the text is floating toward the top of the Control
and is not centered vertically. What should I adjust to make sure the text
is centered both horizontally and vertically?
|
|
|
|
Powered by
FUDForum. Page generated in 0.01482 seconds