Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » org.eclipse.swt.widgets.TreeItem.setGrayed(boolean grayed)
org.eclipse.swt.widgets.TreeItem.setGrayed(boolean grayed) [message #462741] Tue, 18 October 2005 15:25 Go to next message
Darren Beaumont is currently offline Darren BeaumontFriend
Messages: 3
Registered: July 2009
Junior Member
This question may have been asked but i cannot find any trace of the
thread. I know the question was posted on another eclipse board by
"Sascha" but theywere directed to this forum to ask. My Question...

Quote Eclipse API:
"
public void setGrayed(boolean grayed)

Sets the grayed state of the receiver.
"

I expect org.eclipse.swt.widgets.TreeItem.setGrayed(boolean grayed) to
1. to "gray out" a tree element
2. to "disable" it (no context menu, maybe no expanding/collapsing)

If I run:

System.out.println(someTreeItem.getGrayed());
someTreeItem.setGrayed(true);
System.out.println(someTreeItem.getGrayed());

the console output on WinXP is:

false
false

But this method call would not cause any of the above mentioned changes 1.
& 2.

Any ideas?
Re: org.eclipse.swt.widgets.TreeItem.setGrayed(boolean grayed) [message #462785 is a reply to message #462741] Wed, 19 October 2005 11:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: marimuthup.infotechsw.com

Hi,

I hope the Java doc miss leads.

TreeItem.setGrayed() should be used if the tree has been created with SWT.CHECK option.

This will grays the check box, not the whole tree item.

If u wanna to gray the treeitem, u have to change the background color ot the treeitem.

With regards
P.Marimuthu
Re: org.eclipse.swt.widgets.TreeItem.setGrayed(boolean grayed) [message #462794 is a reply to message #462785] Wed, 19 October 2005 14:51 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
I've updated the javadoc on TreeItem.setGrayed() and TreeItem.getGrayed() to
match the more descriptive ones in TableItem.

"Marimuthu P" <marimuthup@infotechsw.com> wrote in message
news:11311979.1129721425301.JavaMail.root@cp1.javalobby.org...
> Hi,
>
> I hope the Java doc miss leads.
>
> TreeItem.setGrayed() should be used if the tree has been created with
SWT.CHECK option.
>
> This will grays the check box, not the whole tree item.
>
> If u wanna to gray the treeitem, u have to change the background color ot
the treeitem.
>
> With regards
> P.Marimuthu
Previous Topic:ScrolledComposite/Composite question
Next Topic:SWT Browser, silent mode?
Goto Forum:
  


Current Time: Thu Apr 18 21:39:10 GMT 2024

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

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

Back to the top