Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » IPageLayout problem
IPageLayout problem [message #444788] Tue, 21 February 2006 03:22 Go to next message
Karl is currently offline KarlFriend
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 #444789 is a reply to message #444788] Tue, 21 February 2006 03:38 Go to previous messageGo to next message
Rohit Khariwal is currently offline Rohit KhariwalFriend
Messages: 114
Registered: July 2009
Senior Member
hi,
can you attach picture of the resultant perspective so that we can better understand the problem
Re: IPageLayout problem [message #444793 is a reply to message #444789] Tue, 21 February 2006 06:09 Go to previous messageGo to next message
Karl is currently offline KarlFriend
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 Go to previous message
Rohit Khariwal is currently offline Rohit KhariwalFriend
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);
}
Previous Topic:Plugins
Next Topic:Word Processor / RTF
Goto Forum:
  


Current Time: Fri Jan 03 04:32:25 GMT 2025

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

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

Back to the top