remove hilite selection from field

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
crawfordmec
Posts: 2
Joined: Sun Oct 12, 2008 6:46 pm

remove hilite selection from field

Post by crawfordmec » Sun Jun 21, 2009 10:17 pm

Greetings

I am using a field object that contains several lines and the field has a script that permits action based on which line is selected. The script (in part) is

on mouseUP
put the selectedText of me into myLine
if myLine is line 1 of fld "list_of_choices" of grp "group_choices" then
...
else if ...
...
end if

Problem: I need to "reset" my application by emptying fields and removing all hiliting and such.

I can not seem to find the commands to "reverse" the colors for the line or restore the field to as if nothing has been selected.

Note: all hiliting is removed if I "save and quit" and then reload the app.

Thank you for your consideration to this problem.
MikeC

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Contact:

Post by Janschenkel » Mon Jun 22, 2009 6:16 am

Assuming you're talking about a list field, you can

Code: Select all

set the hilitedLines of field "MyField" to empty
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

crawfordmec
Posts: 2
Joined: Sun Oct 12, 2008 6:46 pm

Post by crawfordmec » Mon Jun 22, 2009 11:35 am

Jens

It works! I very much appreciate it. BTW I often see your replies and thank you for your polite support of us "newcomers" - I swear I experimented with many combinations of commands via the message box with the idea of "empty" but missed this version.

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

Post by Klaus » Tue Jun 23, 2009 10:12 am

Hi Mike,
crawfordmec wrote:...I swear I experimented with many combinations of commands via the message box ...
no need to justify yourself, we are not the spanish inquisition :P

SparkOut
Posts: 2944
Joined: Sun Sep 23, 2007 4:58 pm

Post by SparkOut » Tue Jun 23, 2009 11:05 am

Heretic! Image

Post Reply