On Thu, Jan 10, 2008 at 07:19:47PM -0700, Dan Dorman wrote:
> Is there any way to "pin" text to a window, so that the text doesn't
> scroll with the rest of the window's contents?
No, not yet. But this has to be done before Hackety Hack comes out,
I need it as well.
I can tell you how the code will look, though.
stack :top => 10, :left => 10, :sticky => Window do
para "This text stays put."
end
The stack will stay at the window's (10, 10) regardless of
scrolling.
The :sticky attribute moves a slot's origin to the corner of the
object being stuck to. So you could attach a tooltip to the corner
of an object which is just flowed in with lots of other elements.
Or you could use :sticky => Mouse to have something positioned
relative to the cursor.
You can emulate all of this right now by recalculating the
coordinates using `Stack#scroll_top` and an `animate` timer. But
I'd also like to get a scroll event going so that you could respond
to scrolling and realize your own pinning schemes.
Give me a few hours and I'll check back when I've got it.
_why