Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Set Shell Properties From a Composite Node in XWT (Is it possible to set shell properties in XWT when its root element is composite?)
Set Shell Properties From a Composite Node in XWT [message #820670] Wed, 14 March 2012 12:16
Tiger Huang is currently offline Tiger HuangFriend
Messages: 3
Registered: March 2012
Junior Member
Dear all,

I'm trying to set the shell properties in an xwt file, however, when the root element of the file is <Compsite>, I have no idea to set the properties of its shell. I've tried the following methods:
<Composite
    xmlns="www.eclipse.org/xwt/presentation"
    xmlns:x="www.eclipse.org/xwt">
    <Composite.shell text="The Shell Title"/>   (This line doesn't work) 
    <Composite.layout>
        <GridLayout marginHeight="4" marginWidth="4"/>
    </Composite.layout>
    <!-- Other UI Elements... -->
</Composite>


<Composite
    xmlns="www.eclipse.org/xwt/presentation"
    xmlns:x="www.eclipse.org/xwt">
    <Composite.parent text="The Shell Title"/>   (This line doesn't work, either) 
    <Composite.layout>
        <GridLayout marginHeight="4" marginWidth="4"/>
    </Composite.layout>
    <!-- Other UI Elements... -->
</Composite>

But they didn't work.

I know the following method works:
<Shell
    xmlns="www.eclipse.org/xwt/presentation"
    xmlns:x="www.eclipse.org/xwt"
    x:style="SHELL_TRIM|APPLICATION_MODAL"
    text="The Shell Title">
    <Composite>
        <!-- Other UI Elements... -->
    </Composite>
</Shell>

But I want the shell is a child shell of another shell. If I invoke the method:
XWT.load(parentShell, url);

where the url is the file which root element is the <Shell>, the Shell returned won't be a child shell of parentShell.

If the url is the file which root element is the <Composite>, XWT.load(parentShell, url) works fine. But I want to put those UI properties, including text, size, margin, ... and layout, in the XWT files not in the Java code. If it is able to set the shell properties in a XWT file even its root element is <Composite>, it will be a great help.

Is there any suggestions?

Tiger
Previous Topic:Starting commands manually
Next Topic:Localization in fragment not working...bug?
Goto Forum:
  


Current Time: Thu Apr 25 12:24:40 GMT 2024

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

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

Back to the top