|
Kamran <kamran@uio.no> wrote in message <h609jp$ul5$1@news01.tp.hist.no>...
> us wrote:
> > Kamran <kamran@uio.no> wrote in message <h5tvd4$b2a$1@news01.tp.hist.no>...
> >> Hi,
> >>
> >> if a context menu is activated when right clicking on a list, is there a
> >> way of knowing which item in the list was licked on ?
> >>
> >> Thanks in advance,
> >
> > no, the current stock-callback only responds to LEFT clicks...
> > however, see the many FEX contributions by yair altman
> >
> > http://www.mathworks.com/matlabcentral/fileexchange/authors/27420
> >
> > as well as his nice UNDOC w3 site
> >
> > http://UndocumentedMatlab.com
> >
> > us
>
> Thanks,
> That is exactly what I am trying to do, i.e. make it respond to RIGHT
> click. Thanks for the links.
>
> Kamran
I've just uploaded a new post that explains exactly how to trap mouse right-clicks and other mouse events on listboxes. This can be used to set dynamic context-menus and dynamic tooltips, based on the actual item beneath the mouse cursor (instead of the static context-menu and tooltip that standard Matlab enables):
http://UndocumentedMatlab.com/blog/setting-listbox-mouse-actions/
Enjoy :-)
Yair Altman
http://UndocumentedMatlab.com
|