XWT. Using TableViewer.columns. Why? [message #574376] |
Fri, 16 April 2010 11:08 |
Konstantin Scheglov Messages: 555 Registered: July 2009 |
Senior Member |
|
|
As I understand, "Class.property" should be used when you want to set value of "property". However TableViewer has no property "columns" or method "setColumns()", etc. It seems that it works without wrapping TableViewerColumn-s into "TableViewer.columns", so is there reason to use it in code generation?
Here is code from xwt tests.
<TableViewer xmlns="http://www.eclipse.org/xwt/presentation"
xmlns:x="http://www.eclipse.org/xwt"
xmlns:j="clr-namespace:java.lang"
Name="TableViewer">
<TableViewer.columns>
<TableViewerColumn width="80" text="column0"/>
<TableViewerColumn width="80" text="column1"/>
</TableViewer.columns>
</TableViewer>
But this also works
<Shell xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt">
<Shell.layout>
<FillLayout type="VERTICAL"/>
</Shell.layout>
<TableViewer x:Style="BORDER | FULL_SELECTION">
<TableViewer.table headerVisible="true" linesVisible="true"/>
<TableViewerColumn width="150" text="Name"/>
<TableViewerColumn width="150" text="Age"/>
<TableViewerColumn width="150" text="Image"/>
</TableViewer>
</Shell>
--
Konstantin Scheglov,
Instantiations, Inc.
Konstantin Scheglov,
Google, Inc.
|
|
|
Powered by
FUDForum. Page generated in 0.49334 seconds