On 11.02.2016 20:14, Samuel Gougeon wrote:
Le 11/02/2016 12:01, Jan-Åge Langeland a écrit :
.../...
I would really like to get the cursor position in the callback, like I do with xclick(), so clicking on different part of the image can work like a menu (Samuel?):

Why not putting xclick() in the callback ? :) Have a try.

I did try:

h.callback="disp(xclick())";  //disp can obviously be replaced with a suitable 
selection function.

I can get it to work in a two click mode: First click the button, then click an image next to the button.

The problem with making one big button with the picture on top, is that xclick() will not give the correct cursor position when on top of a button. Just static values [-2. -1. -1.].

"cbmenu - String: callback associated to a menu if |xclick| returns due to a click on a menu. In this case, |ibutton|, |xcoord|, |ycoord|, and |iwin| take arbitrary values".

Jan Å


_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

Reply via email to