Get which TreeItem has focus in a Tree ? [message #491549] |
Wed, 14 October 2009 19:45  |
Eclipse User |
|
|
|
Hi,
is there any way to figure out which individual TreeItem has focus?
If I call display.getFocusControl(), I get the Tree back, even though the dotted outline is on a leaf.
Thanks,
Gary
|
|
|
|
|
|
|
Re: Get which TreeItem has focus in a Tree ? [message #491914 is a reply to message #491814] |
Fri, 16 October 2009 10:09  |
Eclipse User |
|
|
|
Yes, that's native focus rectangle behaviour. Encouraging apps to depend on
it in general, especially across platforms, probably wouldn't be doing them
any favours.
The snippet in my other reply should work equally well on 64-bit Windows and
Windows 7, assuming that native Tables and Trees in Windows 7 show focus
rectangles.
Grant
"Gary Miguel" <gmiguel@informatica.com> wrote in message
news:hb8bba$hc3$1@build.eclipse.org...
> Hmm, it seems that on Windows XP, there's no focused TreeItem until you
use the keyboard to navigate through the Tree. If I open my app and just use
the mouse to click, shift-click, control-click, etc, there's no dotted line,
and the listener never gets called.
>
> I suppose I can see why it's not a supported SWT feature...
|
|
|
Powered by
FUDForum. Page generated in 0.04883 seconds