Page 1 of 1

Default cursor

Posted: Sat May 06, 2023 10:43 pm
by richmond62
JLG wrote elsewhere:

I'm working on a stack that needs a default cursor. Sometimes it sets the cursor to none, but after that I can't get it back. Could someone verify?

Do this in the message box:

set the defaultCursor to hand <cr>
set the cursor to none; wait 1 second; set the cursor to hand

It doesn't come back. I also tried this:

set the cursor to none; wait 1 second; set the cursor to the defaultcursor

Anyone have a workaround? (To get the regular cursor back after testing, "set the defaultcursor to empty".) "

And I started messing around with a stack with 2 buttons:
-
SShot 2023-05-07 at 0.41.10.png
-
With the following scripts:

HAND 1:

Code: Select all

on mouseUp
   set the defaultcursor to hand
end mouseUp
NONE:

Code: Select all

on mouseUp
   set the defaultcursor to none
   wait 30 secs
   set the defaultcursor to hand
end mouseUp
AND: b*gger me: the cursor never recovered from 'none'.

Re: Default cursor

Posted: Sat May 06, 2023 10:50 pm
by richmond62
Then I tried this:

Code: Select all

on mouseUp
   set the defaultcursor to none
   wait 30 secs
   choose browse tool
   set the defaultcursor to hand
   choose pointer tool
end mouseUp
But that did not work either.

BUT, Joy, Joy, Absolute Joy: this worked:
-
SShot 2023-05-07 at 0.48.51.png
-

Code: Select all

on mouseUp
   set the defaultcursor to none
   wait 10 secs
   focus on fld "ff"
   set the defaultcursor to hand
   focus on nothing
end mouseUp

Re: Default cursor

Posted: Sun May 07, 2023 6:11 pm
by jacque
I think this works because LC forces a cursor change when an editable field gains focus, which overrides the current cursor. Of course, this requires the presence of a field,, which is not available in this case.

Re: Default cursor

Posted: Mon May 08, 2023 8:12 am
by richmond62
What about this?

Code: Select all

on mouseUp
   set the defaultcursor to none
   wait 10 secs
   set the lockScreen to true
   create fld "ff"
   focus on fld "ff"
   set the defaultcursor to hand
   delete fld "ff"
   set the lockScreen to false
   focus on nothing
end mouseUp