viewtopic.php?f=104&t=39195
The question is "how does one hide the cursor?". I found that this works:
Code: Select all
on mouseUp
set the defaultCursor to hand --or arrow, but nothing else
set the cursor to none
end mouseUp
Craig
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Code: Select all
on mouseUp
set the defaultCursor to hand --or arrow, but nothing else
set the cursor to none
end mouseUp
Code: Select all
on mouseUp
set the cursor to empty
set the lockCursor to true
end mouseUp
Code: Select all
on mouseUp
set the defaultCursor to hand
set the cursor to empty
set the lockCursor to true
end mouseUp
Code: Select all
on mouseUp
set the defaultCursor to hand
set the cursor to empty
--set the lockCursor to true
end mouseUp
Code: Select all
on mouseUp
set the defaultCursor to watch
set the cursor to watch
set the lockcursor to "true"
end mouseUp
That's just a polite way of restating what I stated.How does the lockCursor property work?
DefaultCursor and lockCursor solve related but different problems.
AKAIK, yes. One line to set the cursor to an empty image, and the other to make that change persistent beyond idle:2- Is the two-liner method the only way to hide a cursor?
Code: Select all
on mouseup
set the lockcursor to true
set the cursor to empty
end mouseup
Is wrong then?If the lockCursor property is set to true, the cursor shape can be set only by a handler, and does not change shape automatically as the mouse moves. (For example, the cursor normally turns into an arrow over a menu, an I-beam over an editable field, and so on.)
What I described was the intention, addressing both use cases, and is consistent with what I see here.dunbarx wrote: ↑Tue Jul 09, 2024 10:43 pmRichard.
The simple two-liner you posted only works once the cursor is outside the control that hid it. Not sure why, but it is unstable while within it. And if the cursor does indeed leave the control that hid it, and it moves around a bit outside invisibly, it will become unstable again if it moves back into its "starting" control.
Also, once outside, it will change into an IBeam if it encounters an editable field.
My two-liner at least works properly everywhere, unless, as you say, it needs to act as a helpful indicator. But this means the dictionary:Is wrong then?If the lockCursor property is set to true, the cursor shape can be set only by a handler, and does not change shape automatically as the mouse moves. (For example, the cursor normally turns into an arrow over a menu, an I-beam over an editable field, and so on.)
Not sure how much more we should beat this up, but there was an OP who asked...
Code: Select all
set the cursor to none
lock cursor
Code: Select all
on mouseUp
set the defaultCursor to plus
set the cursor to plus
set the defaultCursor to arrow
set the cursor to arrow
lock cursor
end mouseUp
Ain't my work, I just enjoy talking about LC.You work well be simplified by identifying which one you need, and avoiding the other in the same handler.
The method I posted above has worked reliably for me for decades. If it's not working for you I would look elsewhere for the cause, perhaps an engine bug, or a corrupt cursor, or an oddity with a display driver, or something else.