Reliable Cursor Changes?

mfstuart at cox.net mfstuart at cox.net
Mon Feb 25 19:39:23 EST 2008


Hi Scott,

I just tried this in a new stack... seems to work.

I put 3 objects on the stack: Label Field, Field, and a button.
For each object, I created a Custom Property: RollOverCursor and gave the values: 1,2, and no value, respectively for each object.

For each object, I put the following script into them:

on mouseEnter
  switch (the RollOverCursor of me)
  case 1
    set cursor to 76
    break
  case 2
    set cursor to hand
    break
  default
    reset cursors
  end switch
  lock cursor
end mouseEnter

on mouseLeave
  unlock cursor
end mouseLeave

When placing each object on the stack, make sure there is enough space in between them for the engine to "reset" the cursor, else the cursor won't reset to the default.

I like this concept, and will put it into my own applications, thanx Scott. :)

If you need me to put this stack on RevOnline, please reply.

HTH,
Mark Stuart



More information about the use-livecode mailing list