Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XWT » xwt with Sash and FormLayout
xwt with Sash and FormLayout [message #1047665] Tue, 23 April 2013 13:52 Go to next message
Jürgen Weinberger is currently offline Jürgen WeinbergerFriend
Messages: 42
Registered: August 2012

I have a question regarding a sash and formlayout. I want an control that can be resized with a sash controll. In pure SWT it is no problem but how can i reference another control to bind the FormAttachment too, in xwt?

Here is some source to show what i mean (Here i tried it with just binding the tableviewer to the sash).
Note: That this code doesn't work, its just to show my problem
	<TableViewer Name="MasterTableViewer" x:style="MULTI | FULL_SELECTION | BORDER" input="{Binding path=comments, mode=OneWay}">
					<FormAttachment numerator="0" offset="0"/>
					<FormAttachment numerator="100" offset="0"/>
					<FormAttachment numerator="0" offset="0"/>
					<FormAttachment offset="0" control="{Binding ElementName=sash, path=control}"/>
	<Sash x:Name="sash" x:style="VERTICAL">
	<Group text="Summary" background="White">
			<FormData /> 

			<GridLayout numColumns="1" horizontalSpacing="5"/>


In the last FormAttachment in the tableViewer i try to bind the left side to the sash but i don't know how Smile. I would need the reference to the tableviewer control.

Is this possible ?

thanks for any information and
best regards
Re: xwt with Sash and FormLayout [message #1047699 is a reply to message #1047665] Tue, 23 April 2013 14:39 Go to previous message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 854
Registered: July 2009
Senior Member
Sash has no property called "control" (Sash.getControl()), i.e. your expression should not contain an additional path (in this case):

<FormAttachment offset="0" control="{Binding ElementName=sash}"/>

Though, this will bind the right side of your table to the sash.

You should be able to define a reference to your viewer's control as follows:

<TableViewer.table x:name="tvControl" />
Previous Topic:TableViewer selection binding with converter and validation
Next Topic:Using e4 DI in a XWT EventHandler
Goto Forum:

Current Time: Mon Jun 24 22:36:32 GMT 2024

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

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

Back to the top