Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » SWT-square shape Text, Label, Button(Need to create Text, Label or Button with square shape)
SWT-square shape Text, Label, Button [message #990110] Mon, 10 December 2012 22:38 Go to next message
Martin Bayer is currently offline Martin BayerFriend
Messages: 32
Registered: December 2012
Member
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 21:53 Go to previous message
Martin Bayer is currently offline Martin BayerFriend
Messages: 32
Registered: December 2012
Member
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
Previous Topic:gcc, g++ is not found in $PATH
Next Topic:help installing eclipse RCP update silent/scripted install
Goto Forum:
  


Current Time: Wed Apr 21 21:53:37 GMT 2021

Powered by FUDForum. Page generated in 0.03210 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top