[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform.swt] Re: Invisible root TreeItem?

I am not sure what you mean, but I am not that good with SWT and a bit rusty with Java itself, however I see no remedy to my situation from what you said.  The fact that there are two ways I can create a TreeItem like:
 
new TreeItem( Tree, style )
or
new TreeItem( TreeItem, style )
 
and that you can't cast Tree to TreeItem is kind of clunky and I have to have two versions of some of my code to deal with it. 
 
If Tree creates a default root item that's invisible, then I don't have this problem.  Even then, you can still have multiple "root" items under the default root item, right?
 
I am sure I am missing something here since no one seem to complain about this, but I see no clear way around it.
 
 
"Daniel Spiewak" <djspiewak@xxxxxxxxxx> wrote in message news:d78hll$1rl$1@xxxxxxxxxxxxxxxx...
You can create multiple root tree items on the Tree itself.  Unlike with Swing, you can have more than one root.  Thus, accomplishing in actuality what Swing accomplishes by illusion.

Daniel

Joel Chen wrote:
Is is possible to create a TreeItem that's invisble to serve as the root 
item?  I found myself end up with a bunch of functions with identical body 
but one takes Tree and another takes TreeItem in its parameters.  I could 
get around this by just creating a rootTreeItem but now I lost some space in 
the left margin in my tree display.