set the cursor to arrow; browse vs. edit mode of stack;

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
Latarg
Posts: 2
Joined: Wed Aug 15, 2012 9:52 am

set the cursor to arrow; browse vs. edit mode of stack;

Post by Latarg » Wed Aug 15, 2012 10:00 am

Hello!

How can I find out in which mode a stack is concerning "edit" vs. "browse/run".

I try to set the cursor stack wide to arrow so no text field gets an iBeam cursor.

When do I have to call "lock cursor"?

Using "on resumeStack" or "on suspendStack" does not work; they are called in both edit/run modes.

Using "on stackOpen" does not work; cursor is set to arrow even in edit mode!

I want to prevent a using of "MouseWithin" or "MouseEnter" as this is called repeatedly.

Any ideas?

Thanks a lot!

Noah

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: set the cursor to arrow; browse vs. edit mode of stack;

Post by shaosean » Wed Aug 15, 2012 10:26 am

Lots of questions, so lets tackle them one at a time..
How can I find out in which mode a stack is concerning "edit" vs. "browse/run".

Code: Select all

if (the tool = "browse tool") then
  put "browse mode"
else if (the tool = "pointer tool") then
  put "edit mode"
end if
When do I have to call "lock cursor"?
In the mouseEnter command

Code: Select all

on mouseEnter
  lock cursor
  set the cursor to watch
end mouseEnter

on mouseLeave
  unlock cursor
end mouseLeave

Latarg
Posts: 2
Joined: Wed Aug 15, 2012 9:52 am

Re: set the cursor to arrow; browse vs. edit mode of stack;

Post by Latarg » Thu Aug 16, 2012 7:46 am

Thanks a lot!!!

Klaus
Posts: 14198
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: set the cursor to arrow; browse vs. edit mode of stack;

Post by Klaus » Thu Aug 16, 2012 11:36 am

Why not just use LOCKED fields?

Post Reply