How to stop mouse drag on locked field from hiliting text?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Janey
Posts: 9
Joined: Wed Jul 29, 2009 6:29 pm

How to stop mouse drag on locked field from hiliting text?

Post by Janey » Wed Jul 29, 2009 9:40 pm

When I set the locktext to true on a field the cursor stays the arrow but it still hilites the text. The hilited text cannot be copied with cmd-c. (the selectedtext does return the hilited text though).

How can I prevent the text in a locked field from being hilited?
Thanks,
Janey

Janey
Posts: 9
Joined: Wed Jul 29, 2009 6:29 pm

Post by Janey » Wed Jul 29, 2009 9:46 pm

set autoSelect to false

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Wed Jul 29, 2009 11:23 pm

Hi Janey,

Set the traversalOn to false.

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Post by FourthWorld » Wed Jul 29, 2009 11:59 pm

I believe the autoSelect property only affects list fields. Try the autoHilite property, along with the traversalOn that Mark mentioned.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Janey
Posts: 9
Joined: Wed Jul 29, 2009 6:29 pm

Post by Janey » Thu Jul 30, 2009 1:51 am

traversalOn doesn't seem to do anything with respect to the hilite problem but autoSelect does.

Is there a message I can trap in a control at start up so that I can set the state of the control?

If I set the traversalOn of a fld to false then I should not be able to tab into it, right? When I did this I still could tab into the fld.

Janey

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Thu Jul 30, 2009 8:14 am

Hi Janey,

TraversalOn doesn't do anything if you are using a list field, whilte autoHilite doesn't affect unlocked text fields.

Messages you can trap on start up: startUp, preOpenStack, openStack, preOpenCard, openCard, preOpenBackground and openBackground. You might want to look these up in the dictionary.

When the traversalOn is false, you really can't tab into a field. You must have done something wrong there or perhaps you mean something different when you say "tab into".

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply