|
Re: SWT Layout and Widget Question [message #463694 is a reply to message #463692] |
Fri, 11 November 2005 23:38 |
Eclipse User |
|
|
|
Originally posted by: friederich.kupzog.de
Hi,
the idea behind layout is that layouts calculate the widgets position
within a certain area (e.g. window) using basic positioning information
like "all widgets are aligned in a row" (RowLayout) or "widgets are
arranged in rows and clumns with so and so much space between them and
individual widgets span over several rows or columns etc" (GridLayout).
This is better than defining the widgets positions absolutely in pixels
because the layout also cares about resizing/rearranging the widgets
when the window is resized.
To build the arrangement you asked for, I would use a GridLayout with
only one column. The menubar is part of the Shell. For the tree/folder
you need a SashForm. Only ToolBar and SashForm need to be layouted by
the GridLayout. Into the SashForm you put a Tree and a TabFolder
(windows native), or a CTabFolder (like the one in Eclipse).
See also http://www.eclipse.org/articles/ for an article about layouts.
Hope that helped,
Friederich
zinc wrote:
> Hi,
> I am pretty new to SWT. But what is the basic idea behind layout? If I
> want to create an email client for example: with a menubar, a toolbar, a
> treeview of folders to the left, and viewing panel to the right (tabbed
> like eclipse/firefox) what basic layout strategy do I use?
>
> Also, what is the widget that creates the tabbed view kind of panel like
> eclipse?
>
> Thanks
>
--
Friederich Kupzog
Elektronik & Software
Neusser Str. 5-7
50670 Köln
Tel 0241 160696-1
Fax 0221 726670
www.kupzog.de/fkmk
|
|
|
Powered by
FUDForum. Page generated in 0.02987 seconds