Skip to main content



      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 17:38 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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: Tue Jul 15 13:31:22 EDT 2025

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

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

Back to the top