Colorize field wile typing

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
FredBeck
Posts: 77
Joined: Fri Nov 01, 2013 3:07 pm
Location: Paris
Contact:

Colorize field wile typing

Post by FredBeck » Wed Feb 18, 2015 3:38 pm

Hi,
I'd like to colorize a field while typing to check the syntax, like the script editor.
When I set the htmlText, the cursor respawns at char 1, idem with the scroll.
How do you guys do it? Do I need to reclick and rescroll after I'm done, or is there a special trick to it?
Fred.

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

Re: Colorize field wile typing

Post by dunbarx » Wed Feb 18, 2015 5:37 pm

Hi.

Do I understand that you want to hold the scroll constant while you do other stuff with that field? If so, save the scroll in a custom property of the field and restore it after you are done with your colorization or whatever. Depending on what you are doing, you might be able to lock the screen in your handlers, so the user does not even see the restore process.

Craig Newman

FredBeck
Posts: 77
Joined: Fri Nov 01, 2013 3:07 pm
Location: Paris
Contact:

Re: Colorize field wile typing

Post by FredBeck » Wed Feb 18, 2015 5:57 pm

Yes I've done that. Just wanted to know if it was the correct thing to do.
Thanks Craig!

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”