Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWT Layout and Widget Question
SWT Layout and Widget Question [message #463692] Fri, 11 November 2005 19:51 Go to next message
Jeff Yuan is currently offline Jeff YuanFriend
Messages: 34
Registered: July 2009
Member
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
Re: SWT Layout and Widget Question [message #463694 is a reply to message #463692] Fri, 11 November 2005 23:38 Go to previous message
Eclipse UserFriend
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
Previous Topic:[OT?] how to forward these news to an email address?
Next Topic:JFace Action and Thread -> QUID ? Why no GUI refresh ???
Goto Forum:
  


Current Time: Mon Sep 23 23:05:43 GMT 2024

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

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

Back to the top