Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Blank Columns in TableTreeViewer Root Nodes
Blank Columns in TableTreeViewer Root Nodes [message #449714] Fri, 28 January 2005 00:55 Go to next message
Eclipse UserFriend
Originally posted by: jeff.barriault.net

I'm having a little problem figuring out why the root nodes in a
TableTreeViewer only show the text for Column0. Is there some setting
somewhere that controls this? I've dug around in the API docs, but can't
seem to find anything. I'm a little new to GUI programming in general, so
I appologize if this question seems a little simple.

The TableTree in the SWT Custom Controls example shows all the columns,
including the columns for the root nodes. So I'm a little baffled as to
why mine isn't showing.

Thanks,

JB
Re: Blank Columns in TableTreeViewer Root Nodes [message #449726 is a reply to message #449714] Fri, 28 January 2005 13:08 Go to previous messageGo to next message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
The TableTree is a fake widget that uses the image in column 0 to display
the +/-. It will never support an image in column 0. This is described in
the javadoc for TableTreeItem.setImage(int):


/**
* Sets the image at an index.
* <p>
* The image can be null.
* The image in column 0 is reserved for the [+] and [-]
* images of the tree, therefore do nothing if index is 0.
*
* @param image the new image or null
*
* @exception SWTException <ul>
* <li>ERROR_THREAD_INVALID_ACCESS when called from the wrong thread</li>
* <li>ERROR_WIDGET_DISPOSED when the widget has been disposed</li>
* </ul>
*/

The CustomControlExample does not show any images in the columns - it is all
text.

In 3.1, the TableTree is deprecated and you should use the Tree widget with
TreeColumns. The TreeViewer has been modified to support TreeColumns. This
is available in the latest integration build. The Tree draws natively and
supports images in the first column. There is an earlier post in this
newsgroup with an example of how to add columns to the TreeViewer.

"Jeff Barriault" <jeff@barriault.net> wrote in message
news:ctc2iu$sns$1@www.eclipse.org...
> I'm having a little problem figuring out why the root nodes in a
> TableTreeViewer only show the text for Column0. Is there some setting
> somewhere that controls this? I've dug around in the API docs, but can't
> seem to find anything. I'm a little new to GUI programming in general, so
> I appologize if this question seems a little simple.
>
> The TableTree in the SWT Custom Controls example shows all the columns,
> including the columns for the root nodes. So I'm a little baffled as to
> why mine isn't showing.
>
> Thanks,
>
> JB
>
>
>
Re: Blank Columns in TableTreeViewer Root Nodes [message #449762 is a reply to message #449726] Fri, 28 January 2005 21:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: j_barriault.hotmail.com

I'm not talking about images. I'm talking about text. For the root nodes,
I get text in Column0 ONLY. The text for the other columns doesn't
appear on the root nodes. It shows up fine for the child nodes however.
Re: Blank Columns in TableTreeViewer Root Nodes [message #449790 is a reply to message #449762] Fri, 28 January 2005 23:08 Go to previous message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
Have you set a width for the TableColumn objects you created? Even with
TableTreeViewer you must create TableColumns and set the width for them. To
create the TableColumn you must use viewer.getTableTree().getTable() and
pass in the table as the parent of the columns.

"jb" <j_barriault@hotmail.com> wrote in message
news:pan.2005.01.28.21.35.57.239000@hotmail.com...
> I'm not talking about images. I'm talking about text. For the root nodes,
> I get text in Column0 ONLY. The text for the other columns doesn't
> appear on the root nodes. It shows up fine for the child nodes however.
>
Previous Topic:DSOFramer ActiveX and SWT - SWTOleSample.java (1/1)
Next Topic:Problem deploying SWT app with WebStart on Mac
Goto Forum:
  


Current Time: Fri Apr 26 21:51:51 GMT 2024

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

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

Back to the top