Default cursor

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9454
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Default cursor

Post by richmond62 » Sat May 06, 2023 10:43 pm

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'.
Last edited by richmond62 on Sat May 06, 2023 10:51 pm, edited 1 time in total.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9454
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Default cursor

Post by richmond62 » Sat May 06, 2023 10:50 pm

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
Attachments
Curses.livecode.zip
Stack.
(990 Bytes) Downloaded 42 times

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7258
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Default cursor

Post by jacque » Sun May 07, 2023 6:11 pm

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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9454
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Default cursor

Post by richmond62 » Mon May 08, 2023 8:12 am

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

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”