Layouts [message #452576] |
Tue, 22 March 2005 23:00 |
Eclipse User |
|
|
|
Originally posted by: nightblue99.yahoo.com
Hi;
I have three composite namely; Composite1,Composite2 and Composite 3.
Composite1 is composed of Tree, Table and SashForm between them.
Composite2 is composed of just ScroleComposite. Composite 3 is a CoolBar
contains ToolBars crreated by CoolBarManager. I want to combine these
composite like that;
1- Composite1,2,3 is in the shell with full page size
2- There is a SashForm between Composite1 and Composite2
3- When the shell size changed; I do not want to resize any component in
the shell.
I did not achieved this; whenever I changed the size of the shell; all
the composites resize proportional to the shell size;
Thanks for help
|
|
|
Re: Layouts [message #452750 is a reply to message #452576] |
Thu, 24 March 2005 13:13 |
Veronika Irvine Messages: 1272 Registered: July 2009 |
Senior Member |
|
|
When you say that resizing the shell does not change the size of any of the
composites, do you mean that if teh shell gets larger, there will be blank
space and if the shell gets smaller the composites will be clipped? The
following example does this (substituted buttons for widgets but the idea is
the same):
public static void main (String [] args) {
Display display = new Display ();
Shell shell = new Shell (display);
GridLayout layout = new GridLayout(2, false);
shell.setLayout(layout);
SashForm sashForm3 = new SashForm(shell, SWT.HORIZONTAL |
SWT.BORDER);
SashForm sashForm1 = new SashForm(sashForm3, SWT.HORIZONTAL |
SWT.BORDER);
Button tree = new Button(sashForm1, SWT.PUSH);
tree.setText("Tree");
Button table = new Button(sashForm1, SWT.PUSH);
table.setText("Table");
ScrolledComposite sc = new ScrolledComposite(sashForm3, SWT.H_SCROLL
| SWT.V_SCROLL);
Button scContent = new Button(sc, SWT.PUSH);
scContent.setText("Scrolled Composite content");
scContent.pack();
sc.setContent(scContent);
sc.setMinSize(scContent.getSize());
Button coolbar = new Button(shell, SWT.PUSH);
coolbar.setText("CoolBar");
shell.pack();
shell.open ();
while (!shell.isDisposed ()) {
if (!display.readAndDispatch ()) display.sleep ();
}
display.dispose ();
}
"NightBlue" <nightblue99@yahoo.com> wrote in message
news:e9c9e7c860d429b02ea29faae7811a6a$1@www.eclipse.org...
> Hi;
>
> I have three composite namely; Composite1,Composite2 and Composite 3.
> Composite1 is composed of Tree, Table and SashForm between them.
> Composite2 is composed of just ScroleComposite. Composite 3 is a CoolBar
> contains ToolBars crreated by CoolBarManager. I want to combine these
> composite like that;
>
> 1- Composite1,2,3 is in the shell with full page size
> 2- There is a SashForm between Composite1 and Composite2
> 3- When the shell size changed; I do not want to resize any component in
> the shell.
>
> I did not achieved this; whenever I changed the size of the shell; all the
> composites resize proportional to the shell size;
>
> Thanks for help
>
>
>
|
|
|
Re: Layouts [message #452862 is a reply to message #452750] |
Fri, 25 March 2005 14:18 |
Eclipse User |
|
|
|
Originally posted by: nightblue99.yahoo.com
Thanks for answering, I run your code but this is not solution for me. In
fact; I have been developing a SWT GUI builder that will run on the
desktop. In my GUI Builder; there is a Tree which displays the
relationships of the widgets in the design area, Property table which
displays properties of the selected widget from the design area, CoolBar
with multiple widget and container selection, and main design area it is
ScrolledComposite that contains the all widgets that are drag from the
toolbar and drop into it.
In my design Tree and Property table contained in the SashForm
vertical,and there is another SashForm horizontal contains this above
SashForm and ScrolledComposite, and Coolbar. Main view looks like any GUI
builder design tool.
In startup the size of the shell will be constant. But if the user
changes the shell size Tree and Property table must keep the size while
ScrolledComposite and CoolBar shrink with respect to the Shell size.
If you would like to join my project its main address is
https://sourceforge.net/projects/sagu/
I have started this project and now I have just finished the layout of
the main design area.
Thanks;
|
|
|
Powered by
FUDForum. Page generated in 0.02865 seconds