SWT-square shape Text, Label, Button [message #990110] |
Mon, 10 December 2012 17:38  |
Eclipse User |
|
|
|
Hi all,
I'm trying to make Sudoku game as training in SWT and I need to make the cells square. I tried to use Text controls (some of them will not be editable) and GridLayout, but I can't see any posibility to force the Text to be correctly shaped and still fill the whole Shell.
Thank you very much,
Martin
|
|
|
Re: SWT-square shape Text, Label, Button [message #990331 is a reply to message #990110] |
Tue, 11 December 2012 16:53  |
Eclipse User |
|
|
|
Hi again,
I solved it finally but had to override checkSubclass method for Text. I overrode the setBounds method and used following body:
super.setBounds(x, y, Math.min(width, height),Math.min(width, height));
I read that it is not good solution to override some classes like Text, so different/nicer solution will be still welcomed.
Thank you very much,
Martin
|
|
|
Powered by
FUDForum. Page generated in 0.08754 seconds