Home » Eclipse Projects » Eclipse 4 » XWT. How to set absolute (null) layout?
XWT. How to set absolute (null) layout? [message #517398] |
Sat, 27 February 2010 09:27  |
Eclipse User |
|
|
|
I have empty custom Composite that sets RowLayout in its constructor.
I want to use this Composite in XWT, but use instead absolute layout.
How can I do this? We don't have class with name "AbsoluteLayout". I've tried to use attribute layout="null", but this also does not work.
org.eclipse.e4.xwt.XWTException: Converter is missing of type: org.eclipse.swt.widgets.Layout from String
|
|
| | | | | | | | | |
Re: XWT. How to set absolute (null) layout? [message #520581 is a reply to message #517398] |
Fri, 12 March 2010 16:38   |
Eclipse User |
|
|
|
I know I am late in posting this since your last post was in July, but I've just started to look at XWT. I've been trying to get the FormLayout to work as it does in SWT but there seems to be some problems with it. (that is for another post).
As for using a null layout manager, you may want to use the FormLayout. It will allow you to set the x,y coordinates of your widgets in the same way (at least I think it would be in the same way as a null layout manager).
Here is an example of creating a composite that uses a FormLayout to place a single button 10 pixels down and 10 pixels to the right in the composite:
<Composite xmlns="http://www.eclipse.org/xwt/presentation"
xmlns:x="http://www.eclipse.org/xwt"
xmlns:c="clr-namespace:sample.hello"
xmlns:j="clr-namespace:java.lang"
x:Class="sample.hello.HelloWorld"
bounds="0,0,449,171">
<Composite.layout>
<FormLayout /> <!--The composite uses a FormLayout -->
</Composite.layout>
<Button text="Some Button">
<Button.layoutData>
<!--The button is placed 0% plus 10 pixels from the composite's top
and 0% plus 10 pixels from the composite's left side
NOTE: the percent is the of either the composites height (for top)
or the composites width (for left).
SO the end result is that the top, left corner of the button
is placed 10 pixels down and 10 pixels to the right -->
<FormData top="0,10" left="0,10"/>
</Button.layoutData>
</Button>
</Composite>
[Updated on: Fri, 12 March 2010 16:39] by Moderator
|
|
|
Re: XWT. How to set absolute (null) layout? [message #520606 is a reply to message #520574] |
Fri, 12 March 2010 23:59   |
Eclipse User |
|
|
|
You mean in case a Composite has already a default layout. In XWT, you want
to set to null. It is true by now, it is not possible. Please fill a bug in
bugzilla.
best regards
Yves YANG
"Konstantin Scheglov" <Konstantin.Scheglov@gmail.com> wrote in message
news:hneabl$e8t$1@build.eclipse.org...
> You don't understand me.
>
> I don't want to change layout as result of some event, such as when user
> clicks on Button. I just want to set "null" layout statically, in XWT, for
> some Composite subclass.
>
> You probably think that all Composites have "null" layout by default, I
> also was some time under such impression, but it is not. So, if we want to
> use "null" layout on such Composite, we have to set it. But it seems that
> right now XWT does not provide such feature. This is not good, because
> breaks symmetry in using layouts.
>
> --
> Konstantin Scheglov,
> Instantiations, Inc.
|
|
| | | | | |
Re: XWT. How to set absolute (null) layout? [message #570424 is a reply to message #520574] |
Fri, 12 March 2010 23:59   |
Eclipse User |
|
|
|
You mean in case a Composite has already a default layout. In XWT, you want
to set to null. It is true by now, it is not possible. Please fill a bug in
bugzilla.
best regards
Yves YANG
"Konstantin Scheglov" <Konstantin.Scheglov@gmail.com> wrote in message
news:hneabl$e8t$1@build.eclipse.org...
> You don't understand me.
>
> I don't want to change layout as result of some event, such as when user
> clicks on Button. I just want to set "null" layout statically, in XWT, for
> some Composite subclass.
>
> You probably think that all Composites have "null" layout by default, I
> also was some time under such impression, but it is not. So, if we want to
> use "null" layout on such Composite, we have to set it. But it seems that
> right now XWT does not provide such feature. This is not good, because
> breaks symmetry in using layouts.
>
> --
> Konstantin Scheglov,
> Instantiations, Inc.
|
|
| | | | |
Goto Forum:
Current Time: Sat Jul 12 16:20:24 EDT 2025
Powered by FUDForum. Page generated in 0.08326 seconds
|