File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes [SWT] Text resize problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "[SWT] Text resize problem" Watch "[SWT] Text resize problem" New topic
Author

[SWT] Text resize problem

Matthieu BROUILLARD
Greenhorn

Joined: Aug 05, 2004
Posts: 5
Sorry for the cross-post, i have first post in "Java In General" but this forum should be a better place...


Hi all,

i have a problem resizing a Text in a GridLayout.
i have simplified my problem in the following example.
What i want to do is to resize the text1 Text widget correctly.

Here are some screenshoots of what happen, and i post my little example to reproduce.

Thanks for help.

2 columns mode (window is packed)

2 columns mode (window is extended)

3 columns mode (window is extended)


To switch between modes, just give a parameter to the main.

Aurelien Faillon
Greenhorn

Joined: Jul 07, 2004
Posts: 9
d'apr�s ton nom tu as l'air d'�tre fran�ais...

je te reponderais donc que j'aurais utilis� le SWING plutot que le SWT... je trouve plus simple d'utilisation...
en plus pour le SWING tu peux aller voir sur la javadoc...
http://java.sun.com/j2se/1.4.2/docs/api/

sinon il doit surement y avoir une m�thode du style de "setSize"...

[ August 05, 2004: Message edited by: Aurelien Faillon ]
[ August 05, 2004: Message edited by: Aurelien Faillon ]

....A...............N<br />B.......T.......A....<br />............M........
Matthieu BROUILLARD
Greenhorn

Joined: Aug 05, 2004
Posts: 5
I have found the solution, i made a missunderstanding between widget style and widget alignement. To correct the problem just replacebythe javadoc is not very very clear in SWT...
Matthieu BROUILLARD
Greenhorn

Joined: Aug 05, 2004
Posts: 5
Originally posted by Aurelien Faillon:
je te reponderais donc que j'aurais utilis� le SWING plutot que le SWT...
Thanks, but i need to use SWT as the final goal of the window was to be integrated into an eclipse plugin. Sure, Swing is much more documented than SWT but when you don't have the choice...
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: [SWT] Text resize problem