SWT Designer allows you to create the views, editors, perspectives, pref pages, composites, etc. that comprise Eclipse SWT & RCP applications and plug-ins.
Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg
by fabiorafael » Fri Sep 17, 2010 6:58 am
Hi all,
I'm a new WindowBuilder Pro user.
I have a very simple question, but I could not find the answer anywhere.
Is there a way to automatically make the Designer form size fit the widgets ?
I added some images inside some labels, and the widgets go outside the form designer area.
The only way I could find to define the size of the designer form is draging the corner of the form.
Is there some better way to handle the size of the Designer Form.
Thanks in advance.
Regards
-
fabiorafael
-
- Posts: 4
- Joined: Fri Sep 17, 2010 6:52 am
by Eric Clayberg » Fri Sep 17, 2010 7:08 am
WB will show a form at any size you want since they can grow and shrink based on context.
Drag the corner to resize the form to see it at different sizes.
At runtime, you can have a form size itself by adding a call to pack().
-
Eric Clayberg
- Moderator
-
- Posts: 4503
- Joined: Tue Sep 30, 2003 6:39 am
- Location: Boston, MA USA
-
by fabiorafael » Fri Sep 17, 2010 11:07 am
Is there a way to automatically resize the Form at WB during design based on the context ?
Everything shows OK during runtime, but, during design, is quite problematic to manually resize the form so everything fit's inside while dropping components.
-
fabiorafael
-
- Posts: 4
- Joined: Fri Sep 17, 2010 6:52 am
by Eric Clayberg » Fri Sep 17, 2010 11:44 am
fabiorafael wrote:Is there a way to automatically resize the Form at WB during design based on the context ?
Everything shows OK during runtime, but, during design, is quite problematic to manually resize the form so everything fit's inside while dropping components.
Did you try the "Right-Click > Set minimum size" command?
-
Eric Clayberg
- Moderator
-
- Posts: 4503
- Joined: Tue Sep 30, 2003 6:39 am
- Location: Boston, MA USA
-
by fabiorafael » Fri Sep 17, 2010 2:48 pm
It does not show "set minimum size" anywhere.
I tried right clicking everywhere
-
fabiorafael
-
- Posts: 4
- Joined: Fri Sep 17, 2010 6:52 am
by Eric Clayberg » Fri Sep 17, 2010 3:10 pm
You didn't actually say what you were trying to create or provide an example or provide a screen shot, so I assumed either an SWT Shell or Composite.
Both offer that command when you right-click on them.
-
Eric Clayberg
- Moderator
-
- Posts: 4503
- Joined: Tue Sep 30, 2003 6:39 am
- Location: Boston, MA USA
-
by fabiorafael » Fri Sep 17, 2010 5:17 pm
Oh, I'm sorry.
I'm trying to create a ViewPart for a RCP Application
-
fabiorafael
-
- Posts: 4
- Joined: Fri Sep 17, 2010 6:52 am
by Eric Clayberg » Fri Sep 17, 2010 7:05 pm
ViewParts don't have a natural size. They can appear at any size in Eclipse, so you should just size it something convenient in the design view.
You should also be careful with the layout managers you use in a ViewPart. In almost all cases, something like GridLayout is the most appropriate.
-
Eric Clayberg
- Moderator
-
- Posts: 4503
- Joined: Tue Sep 30, 2003 6:39 am
- Location: Boston, MA USA
-
Return to SWT Designer
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest