[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: Tree & TreeItems with SWT.SELECTION

See
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet97.java?rev=HEAD&content-type=text/vnd.viewcvs-markup

"Ivan" <zorziivan83@xxxxxxxxxxx> wrote in message
news:751ff08f40721c2b0a3dce00e94f7128$1@xxxxxxxxxxxxxxxxxx
> I would like to know which event I should use to handle this platform
> problem. If setting menus [tree.setMenu(popupMenu)] on MouseDown won´t
> work, is there another event that can have same results on both Linux and
> Windows?
> My application should do the following:
> - the user selects a TreeItem
> - every TreeItem has a Data behind (treeItem.setData(Object)) and
> depending on the Data associated with every TreeItem, a different popup
> menu is set to the Tree using tree.setMenu(popupMenu).
> - the correct popupMenu is displayed on the screen.
>
> I want that the mouse selection and the display of the popupMenu happen at
> the same time: I mean, as soon a TreeItem gets selection via a mouse click
> (possibly the right-click) the correct popupMenu is set to the Tree and
> displayed on the screen.
>
> I can give you another snippet to try that best show you the problem.
>
> Thanks,
>
> Ivan
>
>
>
>
>