This link has been bookmarked by 63 people . It was first bookmarked on 29 May 2008, by Lubos Pochman.
-
18 Nov 16
-
22 May 14
-
14 Feb 14
-
16 Oct 12
-
pplications can decide to size and place a
Composite's children initially, or in a resize listener -
If children are not given a size, they will have zero size and they cannot be seen
-
horizontalSpan
-
-
19 Sep 12
-
19 Jul 12
-
14 Mar 12
-
29 Nov 11
-
FormLayoutworks by creatingFormAttachments for each side of the widget, and storing them in the layout data. An attachment 'attaches' a specific side of the widget either to a position in the parentCompositeor to another widget within the layout. This provides tremendous flexibility when laying out, as it allows you to specify the placement of individual widgets within the layout. -
The
marginWidth, andMarginHeightfields inFormLayoutare similar to those inGridLayout. Left and right margins are defined bymarginWidth, and top and bottom margins are defined bymarginHeight. Margins can also be defined on a per-widget basis in the attachments.FormLayoutmargins are zero by default. -
FormDataobjects specify how each widget in aFormLayoutwill be laid out. EachFormDataobject defines the attachments for all four sides of the widget. These attachments tell where to position each side of the widget. To set a widget'sFormDataobject, you use thesetLayoutData(Object)method, for example: -
This code creates a
FormDataobject with no attachments. In this case, default attachments are defined, which defeats the whole purpose and utility ofFormLayout. The default attachments attach the widget to the top and left edges of the parentComposite. If every widget in aFormLayoutused the default attachments, they would all be laid out one on top of another in the top left corner of the parentComposite. -
The
left,right,top, andbottomfields ofFormDataspecify theFormAttachmentobjects that are associated with the left, right, top and bottom sides of the widget, respectively.
-
-
28 Oct 11
-
28 Sep 11
-
12 Jul 11
-
16 Jun 11
-
21 Mar 11
-
08 Sep 10
-
17 Aug 10
-
11 Jun 10
-
Understanding Layouts in SWT
-
-
24 May 10
-
20 May 10
-
Understanding Layouts in SWT
-
-
19 Mar 10
-
15 Mar 10
-
19 Oct 09
-
03 Oct 09
-
18 Aug 09
-
18 Jul 09
-
09 Jul 09
-
15 Apr 09
-
07 Apr 09
-
17 Mar 09
-
17 Feb 09
-
06 Nov 08
-
20 Sep 08
-
12 Aug 08
-
16 Jun 08
-
06 Jun 08
-
30 May 08
-
29 May 08
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.