Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » ComboViewer(Event on a ComboViewer)
ComboViewer [message #635797] Thu, 28 October 2010 07:54 Go to next message
Missing name Missing name is currently offline Missing name Missing name
Messages: 57
Registered: September 2009
Member
Hello,

I have a XWT file that contains a ComboViewer.
On selecting a value in the combo, I would like to update a form place under th combo.
How can I realise this ?

Here an extract of my xwt file:
<Composite xmlns="http://www.eclipse.org/xwt/presentation"
	xmlns:x="http://www.eclipse.org/xwt" xmlns:css="http://www.eclipse.org/css"
	xmlns:c="clr-namespace:org.myproject.ui"
	xmlns:j="clr-namespace:org.myproject.ui"
	x:Class="org.myproject.ui.MyData"
	bounds="0,0,936,916">
		
	<Composite.layout>
		<GridLayout numColumns="1" />
	</Composite.layout>
	<Composite.layoutData>
		<GridData grabExcessHorizontalSpace="true"
			horizontalAlignment="SWT.FILL" />
	</Composite.layoutData>

	<Composite>
		<Composite.layout>
			<GridLayout numColumns="2" makeColumnsEqualWidth="true" />
		</Composite.layout>
		<Composite.layoutData>
			<GridData grabExcessHorizontalSpace="true"
				horizontalAlignment="SWT.FILL" />
		</Composite.layoutData>
		
		<Composite>
			<Composite.layout>
				<GridLayout numColumns="2" />
			</Composite.layout>
			<Composite.layoutData>
				<GridData grabExcessHorizontalSpace="true"
					horizontalAlignment="SWT.FILL" />
			</Composite.layoutData>
			<Label text="Select a cartesian orbit generated:" css:id="LabelUnBold"></Label>
			<ComboViewer name="myCombo" enabled="false" input="{Binding Path=lstKeys, updateSourceTrigger=PropertyChanged}">
				<ComboViewer.contentProvider>
					<j:ContentProvider/>
				</ComboViewer.contentProvider>
				<ComboViewer.labelProvider>
					<j:LabelProvider/>
				</ComboViewer.labelProvider>
				<ComboViewer.control.layoutData>
					<GridData grabExcessHorizontalSpace="true" widthHint="150"
						horizontalIndent="40" />
				</ComboViewer.control.layoutData>
								
			</ComboViewer>
		</Composite>


	</Composite>


	<Composite>
		<Composite.layout>
			<GridLayout numColumns="3" />
		</Composite.layout>
		<Composite.layoutData>
			<GridData grabExcessHorizontalSpace="true"
				horizontalAlignment="SWT.FILL" />
		</Composite.layoutData>

		<Group background="#C0C0C0">
			<Group.layoutData>
				<GridData grabExcessHorizontalSpace="true"
					horizontalAlignment="SWT.FILL" horizontalSpan="3" />
			</Group.layoutData>
			<Group.layout>
				<GridLayout numColumns="1" />
			</Group.layout>
			<Composite bounds="10,10,636,516">
				<Composite.layout>
					<GridLayout numColumns="2" />
				</Composite.layout>
				<Composite.layoutData>
					<GridData grabExcessHorizontalSpace="true"
						horizontalAlignment="SWT.FILL" />
				</Composite.layoutData>
				<Label text="Name">
					<Label.layoutData>
						<GridData horizontalIndent="30" />
					</Label.layoutData>
				</Label>
				<Text text="{Binding path=entry.name}">
					<Text.layoutData>
						<GridData grabExcessHorizontalSpace="true" widthHint="150"
							horizontalIndent="30" />
					</Text.layoutData>
				</Text>
			</Composite>
		</Group>
	</Composite>

</Composite>


The comboViewer is filled whith lstKeys. It's OK.

Have you got an idea ?
Where can I find information (blogs, tuto...)?
CVS example projects don't explain this.

Thank you.
Re: ComboViewer [message #635812 is a reply to message #635797] Thu, 28 October 2010 08:38 Go to previous messageGo to next message
Erdal Karaca is currently offline Erdal Karaca
Messages: 750
Registered: July 2009
Senior Member
You can apply the master/detail pattern: just have a look at the tableviewer.master.detail packages in the tests plugin...
Re: ComboViewer [message #635815 is a reply to message #635812] Thu, 28 October 2010 08:52 Go to previous message
Missing name Missing name is currently offline Missing name Missing name
Messages: 57
Registered: September 2009
Member
Thank you very much, the example seems to be useful.
Previous Topic:TitleAreaDialog in a XWT file
Next Topic:What about undo/redo?
Goto Forum:
  


Current Time: Sat Oct 25 05:36:34 GMT 2014

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

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