How to identify hilited lines in a list field

MisterX b.xavier at internet.lu
Mon Jun 28 17:34:37 EDT 2004


Ian,

try this

<script>
local lastselectedlines

on mouseup

if the hilidedlines of me is not lastselectedlines then
  parse me
  doyouscript
  -- remember last status
  put the hilitedlines of me into lastselectedlines
end mouseup
</script>

the local out of the handler remembers what happened last...
Very powerful feature...

Use the custom props instead of the local handler
if you need this set between different runs of the program...

> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com
> [mailto:use-revolution-bounces at lists.runrev.com]On Behalf Of Ian
> McKnight
> Sent: Saturday, June 26, 2004 23:20
> To: use-revolution at lists.runrev.com
> Subject: How to identify hilited lines in a list field
>
>
> Hi
>
> I have a list of names in a field which has the Auto-hilite, List
> behaviour, Multi-line, contiguous and click to toggle all set to true.
> Setting traversalOn doesn't seem to make a difference.
>
> I want to be able to click on individual lines in the list and trigger an
> action on an equivalent line in another field. I also want to be able to
> toggle the action.
>
> The field behaves as I want - I can hilite and un-hilite as many
> lines as I
> wish and I can identify the line on which I have clicked. My problem is
> that I can't identify if an individual line is highlighted as I click it
>
> I'm sure this is a problem with a very simple solution but I
> can't see the
> wood for the trees! Help please!
>
>
> Regards
>
> Ian McKnight
>



More information about the use-livecode mailing list