Paul Steven <[EMAIL PROTECTED]> wrote:
> I have a scrolling TEXT member that I would like to display a hilite
> (simply a quickdraw shape) when a line is clicked... I would like
> this hilite to remain over the selected line as the text member is
> scrolled. I am using the custom scrollbar behaviour from the library
> palette (Director 8.51).
Hi Paul,
I placed a behavior on the scrolled text sprite with the following handlers
(pseudo-Lingo):
property pLine -- line selected by a mouseUp on the text
on mouseUp(me)
tLine = the line the user clicked on
me.mHiliteline(tLine)
end
on mHiliteline(me, aLine)
if integerP(aLine) then
pLine = aLine
end if
set the hilite sprite to the rect of line pLine
end
I imagine that you can adapt this to suit your current implementation.
I then added the following line to the SetDraggerShift() handler of the
Custom Scroll Bar behavior...
call(#mHiliteline, myScrolledSprite)
The SetDraggerShift() handler is called each time the user moves the scroll
bar, so the hilite sprite is moved along with the text.
I have sent you a demonstration movie separately.
Cheers,
James
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi To post messages to the list, email
[EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for
learning and helping with programming Lingo. Thanks!]