Cursor visibility problem

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

CAsba
Posts: 381
Joined: Fri Sep 30, 2022 12:11 pm

Cursor visibility problem

Post by CAsba » Thu May 02, 2024 11:43 am

Hi all,
I've been having problems seeing/locating the cursor when editing scripts - old eyes are easily challenged! I took a look in the dictionary and tried importing a solid black arrow. I restarted LC and the black arrow was great - BUT, the arrow and script froze, so I closed down without saving and opened last night's copy of my project. Looking closer in the dictionary, it does state desktop - no mention of laptop - so as I'm working on a laptop maybe that's the prob. Does anyone have expertise in this area, both to confirm or reject the desktop/laptop possible cause, and to offer any other way to get a more visible cursor?

Klaus
Posts: 13858
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Cursor visibility problem

Post by Klaus » Thu May 02, 2024 11:56 am

Hi CAsba,

desktop also means laptop! :-)
The opposite of "desktop" is mobile and html (web).

However setting the "cursor" to any graphic should not crash your machine,
as long as the image meets theses requirements:
Windows XP and above support full alpha-blended cursors up to 64x64
More recent Linux distributions support alpha-blended cursors up to a size of 64x64
Mac OS X supports alpha-blended cursors up to 256x256
What OS and LC version are you using?


Best

Klaus

CAsba
Posts: 381
Joined: Fri Sep 30, 2022 12:11 pm

Re: Cursor visibility problem

Post by CAsba » Thu May 02, 2024 1:08 pm

Hi Klaus,
It's a Windows laptop, Win11., so it should be ok....BUT
Currently the situation is that the cursor varies between a heavy black I-beam and the default cursor. I also tried changing the cursor in Windows, but that does not affect LC. it's no worse now than what it was before, but I was hoping to get a more visible - permanent - cursor.

Klaus
Posts: 13858
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Cursor visibility problem

Post by Klaus » Thu May 02, 2024 1:53 pm

Hm, how and when did/do you set the cursor in LC?

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9729
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Cursor visibility problem

Post by dunbarx » Thu May 02, 2024 2:07 pm

CAsba.

You can write a little ditty in the stack script like:

Code: Select all

on mouseUp
   if the optionKey is down then set the screenMouseLoc to  the loc of this stack
end mouseUp
Now just click with optionKey and the cursor will appear at the center of the card window.


Craig

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

Re: Cursor visibility problem

Post by richmond62 » Thu May 02, 2024 2:11 pm

Here is something to amuse yourself with:
-
Screenshot 2024-05-02 at 16.09.07.png
Attachments
Cursor demo.livecode.zip
Stack.
(3.16 KiB) Downloaded 7 times

CAsba
Posts: 381
Joined: Fri Sep 30, 2022 12:11 pm

Re: Cursor visibility problem

Post by CAsba » Thu May 02, 2024 2:45 pm

Thanks everyone, great stuff.
Klaus,
Having shut down and restarted LC it now appears that I have a stable bold black arrow to navigate with - just what I needed.
Thanks for your kind interest.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9729
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Cursor visibility problem

Post by dunbarx » Thu May 02, 2024 2:56 pm

CAsba.

Good, Just so you know, you can also:

Code: Select all

if the optionKey is down then set the screenMouseLoc to  the loc of  stack "revNewScriptEditor 1"
which will place the cursor in the center of the SE.

Craig

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

Re: Cursor visibility problem

Post by jacque » Fri May 03, 2024 1:46 am

CAsba wrote:
Thu May 02, 2024 2:45 pm
Having shut down and restarted LC it now appears that I have a stable bold black arrow to navigate with - just what I needed.
I'm curious how you solved it. Did you set the defaultCursor? I had a stack that needed to use a custom cursor throughout and I ended up editing the arrow image in the revMacCursors stack. I think the Windows cursors stack is just called revCursors.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

CAsba
Posts: 381
Joined: Fri Sep 30, 2022 12:11 pm

Re: Cursor visibility problem

Post by CAsba » Wed May 08, 2024 11:31 am

Hi Jacque,
I'm afraid my 'solution' did not last. For some reason - possibly after shutdown/startup - the cursor reverted to its previous hardly visible state whilst in the script and in the IDE, but changes to large and black only in the yellow headers. So, sorry if I misled you there. I tried again, and got I-beam in bold in the script panel - but hardly visible arrow in the IDE, then for some reason the I-beam reverted to the hardly visible arrow. So, I gave up ! It would be good to even change the colour - say, RED, but I don't think that's a possibility.

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

Re: Cursor visibility problem

Post by richmond62 » Wed May 08, 2024 1:39 pm

Custom cursor images must contain three colors: black, white, and a transparent color.
I wonder why?

CAsba
Posts: 381
Joined: Fri Sep 30, 2022 12:11 pm

Re: Cursor visibility problem

Post by CAsba » Wed May 08, 2024 3:11 pm

Hi,
Following your hint I looked some more and found some coding that I put into a button but it didn't do anything.

Code: Select all

set the lockCursor to true  -- locking the cursor gives *you* control of the cursor from the system. So that you can set the icon.
set the cursor to hand
set the lockCursor to false  -- returns the cursor back to the system.
Any help would be much appreciated.

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

Re: Cursor visibility problem

Post by richmond62 » Wed May 08, 2024 3:24 pm

Probably it is a better idea to change the cursor to what you want FIRST, and then set the lockCursor to true SECOND. 8)


Click on the big hand!
Attachments
CURSES.livecode.zip
Stack.
(7.97 KiB) Downloaded 11 times

CAsba
Posts: 381
Joined: Fri Sep 30, 2022 12:11 pm

Re: Cursor visibility problem

Post by CAsba » Fri May 10, 2024 3:00 pm

Thanks. The hand is great. I haven't figured out how to keep it in my stack - it works for a while then reverts to normal cursor and I have to run the code again to get it back. How can I make it permanent ?

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9729
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Cursor visibility problem

Post by dunbarx » Fri May 10, 2024 5:27 pm

CAsba.

There seems to be a bug in LC where "lock cursor" breaks in a number of situations. But if you:

Code: Select all

set the defaultCursor to "yourCursorStyle"
the new cursor will stick everywhere. This property can be changed at will, and from any source.

Craig

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”