Keeping the hilitedLine of a scrolling list field
Alan Gayne
alanIra9 at mac.com
Wed Dec 11 20:27:01 EST 2002
Hi Igor
you might want to try this:
on mouseUp -- in the list fld - fld "myList"
put word 2 of the clickline into lineNum
set the cHilitedLine of this card to lineNum
end mouseUp
on preOpenCard
set the hilitedLines of fld "myList" to cHilitedLine of this card
end preOpenCard
I think that should do the trick since I have successfully used a
variation of this in a list dialog I've built
Let me know how you make out.
Alan
On Wednesday, December 11, 2002, at 05:03 PM, Igor de Oliveira Couto
wrote:
> Dear Rev Friends,
>
> I need to keep the hilitedLine of a certain scrolling list field of a
> card, so that if the user leaves the card while an item in the list is
> selected, then comes back to the same card later, the same item is
> still selected in the list. I also need to save the hilitedLine from
> session to session, so that next time the user opens the stack that
> line will still be selected.
>
> I tried saving the hilitedLine into a custom property, whenever it is
> changed (selectionChanged, arrowKey, mouseRelease). That part is
> working fine - it does, indeed, know which line is SUPPOSED to be
> hilited. However, the problem for me has been to try and get the
> *&^%^*#@#$ line to hilite when the user re-enters the card! I've tried
> putting commands to set the hilitedLine on openCard and on
> preOpenCard, but it just does not work...
>
> Interesting side note: if the user moves from card to card by using
> the arrow keys on the keyboard, Revolution AUTOMATICALLY 'saves' the
> hilitedLine. If the user uses a background button group (which is what
> I am doing) then it does not...
>
> All help/suggestions are greatly appreciated.
>
> Kind Regards,
> --
> Igor
> ----------------------------------
> igor at pixelmedia.com.au
> ----------------------------------
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
More information about the use-livecode
mailing list