Deleting lines in a scrolling list box?
kray at sonsothunder.com
Tue Nov 28 14:30:39 EST 2006
On 11/28/06 12:08 PM, "Jan Schenkel" <janschenkel at yahoo.com> wrote:
>> Note - make sure the 'multipleHilites' for the field
>> is FALSE (meaning the
>> user can only select one line in the list), otherwse
>> the script above will
>> fail. For a more "universal" script, that works with
>> both single and
>> multiple selections, try this:
>> on mouseUp
>> if the hilitedLines of fld 1 is not empty then
>> put the hilitedLines of fld 1 into tHLines
>> put the number of items of tHLines into tNum
>> repeat with x = tNum down to 1
>> delete line (item x of tHLines) of fld 1
>> end repeat
>> end if
>> end mouseUp
>> Have fun!
>> Ken Ray
> Actually, Ken, the hilitedLines are not necessarily in
> the right order -
Really? I haven't seen this... do you have an example of when this occurs?
Sons of Thunder Software, Inc.
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com
More information about the Use-livecode