Hot Tracking a text line in a field
tsj
tsj at unimelb.edu.au
Sun Nov 22 22:21:26 EST 2009
How about using 'the mouseline'
Word 2 of the mouseline will give you the relevant line number for your
field and as you're using a field with its dontWrap set to true you can just
trap this and do your underlining. Say for example the text you want to
highlight is the second 'column' in your field then you could do something
like - this is probably a bit simplistic but...
Local pLine
on mouseMove
put word 2 of the mouseLine into tLine
set the itemDel to tab
if pLine > 0 then
set the textStyle of item 2 of line pLine of me to plain
end if
put tLine into pLine
set the textStyle of item 2 of line pLine of me to underline
end if
end mouseMove
HTH,
Terry...
On 23/11/09 2:11 PM, "Mark Stuart" <mfstuart at cox.net> wrote:
> Hi all,
> Platform: WinXP
> RunRev: 4.0
>
> I've built a TreeView like field with parent nodes and indented child nodes.
> If you're familiar with Tree Views in Windows, you'll notice that as you
> mouse over a node in the tree, it underlines the text. And as you leave the
> node, it returns to plain formatting.
>
> I'd like to apply this behavior to my field.
> I've tried different mouse commands in the "on mouseMove" handler, but can't
> get the desired effect.
>
> How would I go about that?
>
> Regards,
> Mark Stuart
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list