Home » Eclipse Projects » Rich Client Platform (RCP) » IPageLayout problem
IPageLayout problem [message #444788] |
Tue, 21 February 2006 03:22 |
Karl Messages: 92 Registered: July 2009 |
Member |
|
|
Hi,all:
I want to arrange three folder (folder1:left, folder2:center,
folder3:right)in a perspective by the following code, but i can't get the
right scale size of each folder(the radio that i specified in code does
not work).How to deal with layout in this case?
public void createInitialLayout(IPageLayout layout) {
IFolderLayout folder1 = layout.createFoder("folder1",
IPageLayout.Left, .25f, IPageLayout.ID_EDITOR_AREA);
folder1.addPlaceHolder( ... );
folder1.addView(...);
IFolderLayout folder2 = layout.createFoder("folder2",
IPageLayout.Right, .50f, IPageLayout.ID_EDITOR_AREA);
IFolderLayout folder3 = layout.createFoder("folder3",
IPageLayout.Right, .15f, "folder2");
|
|
| |
Re: IPageLayout problem [message #444793 is a reply to message #444789] |
Tue, 21 February 2006 06:09 |
Karl Messages: 92 Registered: July 2009 |
Member |
|
|
Hi, Rohit:
I use "News Portal",so i can't attach picture.Let me describe my problem
in more detail way.
I want to create three folder horizontally :folder1 which is located on
the left , folder2 which is located on the center , folder3 which is
located on the right. The space occupied by the perspective is divided
into three parts:part1 which is assigned to folder1 and occupy 0.25 space
of the whole space,part2 which is assigned to folder2 and occupy 0.5
space,part3 which is assigned to folder3 and occupy 0.2 space. The
following code implement the above layout, but i can't get the right
scale: the size of folder2 is too small and not occupy 0.5 space.I know
the FormLayout of the SWT,in which we can specify percent size of each
part,but i find it's not possible to apply the same principle to
IPageLayout.How to deal with layout in this case?
public void createInitialLayout(IPageLayout layout) {
IFolderLayout folder1 = layout.createFoder("folder1",
IPageLayout.Left, .25f, IPageLayout.ID_EDITOR_AREA);
folder1.addPlaceHolder( ... );
folder1.addView(...);
IFolderLayout folder2 = layout.createFoder("folder2",
IPageLayout.Right, .50f, IPageLayout.ID_EDITOR_AREA);
IFolderLayout folder3 = layout.createFoder("folder3",
IPageLayout.Right, .15f, "folder2");
}
|
|
|
Re: IPageLayout problem [message #444794 is a reply to message #444793] |
Tue, 21 February 2006 06:21 |
Rohit Khariwal Messages: 114 Registered: July 2009 |
Senior Member |
|
|
hi,
try this. you will get your reuired layout.
public void createInitialLayout(IPageLayout layout) {
IFolderLayout folder1 = layout.createFoder("folder1",
IPageLayout.Left, .25f, IPageLayout.ID_EDITOR_AREA);
folder1.addPlaceHolder( ... );
folder1.addView(...);
IFolderLayout folder2 = layout.createFoder("folder2",
IPageLayout.LEFT, .50f, IPageLayout.ID_EDITOR_AREA);
IFolderLayout folder3 = layout.createFoder("folder3",
IPageLayout.LEFT, .25f, IPageLayout.ID_EDITOR_AREA);
}
|
|
|
Goto Forum:
Current Time: Fri Jan 03 04:32:25 GMT 2025
Powered by FUDForum. Page generated in 0.02809 seconds
|