I have a figure containing an axes and text box:
f = figure;ax = axes(f,'Units','normalized','Position',[.1 .3 .8 .6]);txt = annotation(f,'textbox','FontSize',12,... 'Units','normalized','Position',[.1 .1 .35 .06],... 'BackgroundColor','white');
How do I continuously track the location of the cursor and record it in the text box? And how do I make the tracking stop when the user clicks a certain button?
Best Answer