[Gtk-sharp-list] right click mouse - question

Marco mf74 at gmx.de
Fri May 6 06:01:56 EDT 2011


Depends on what you want do to in detail.

For the simple case that you are in a single-selection scenario and want 
something like a context menu:
Usually, right- or left-clicking selects an item (with the exception 
that the selection doesn't change if you click into "free rows" in the 
control). You can just get the selected item from the tree view (e.g. 
using TreeView.Selection.* methods --- details depend a LOT on what you 
want to do and how your storage look like, so I can't give you an 
example, only the advice to look for a TreeView tutorial or the API specs).

In multi-selection it get's more tricky, if you need to know which item 
was potentially selected/deselected last and the mosue currently really 
is over..

Regards,
Marco


Am 06.05.2011 10:01, schrieb luca:
> thanks for the reply first of all,
>
> do i need to get the area and coords (( ie.treeIter disposal on (X, Y),
> offsetX, offsetY)coords ) for every treeIter and veryfing if the position
> where the mouse was clicked match one of treeIter area or there is a quickly
> method of doing the same job?
>
>
> ciao / regards,
> Luca
>
> --
> View this message in context: http://mono.1490590.n4.nabble.com/right-click-mouse-question-tp3498724p3501615.html
> Sent from the Mono - Gtk# mailing list archive at Nabble.com.
> _______________________________________________
> Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list


More information about the Gtk-sharp-list mailing list