Hi, I am not a MATLAB programmer but have a lot of experience with C and Basic. Therefore, for my sins, I have been asked to look at a problem one of our researchers is having with some code written a long time ago which works fine in version 220.127.116.11 but is giving a problem in MATLAB version 18.104.22.1689
There is a GUI as part of the program that shows the mouse cursor when it is initially displayed, ie the mouse can be moved around the screen and is always visible.
On clicking a button to execute a function, in the earlier version of MATLAB, the mouse cursor remains visible inside this GUI along with the ginput crosshairs. However, in the later version, the mouse cursor disappears and all that is visible are the crosshairs as the mouse is moved around.
I have tracked down the point in the code where the cursor becomes invisible and it is when this function is executed. I have copied it below.
Can anyone tell me why this should be happening and, even better, how I can make the cursor remain visible using the later version of MATLAB, please.
The earlier version of MATLAB is running under Windows XP. The later version is on both an XP and Windows 7 machine and both display this problem.
Very many thanks,
% --- Executes on button press in markEnclosuresPushbutton. function markEnclosuresPushbutton_Callback(hObject, eventdata, handles)
px = ones( 1, 16 ); py = ones( 1, 16 );
for encCnt = 1 : 16
[ px( encCnt ), py( encCnt ) ] = ginput(1);
plot( px( encCnt ), py( encCnt ), 'r.' )
h = text( px( encCnt ) + 2, py( encCnt ) -2, num2str( encCnt ) );
handles.data.spec.encPx = px;
handles.data.spec.encPy = py;
set( handles.startPushbutton, 'enable', 'on' );
guidata( hObject, handles );