Hi Mike,
You need to specify that the stack is scrollable. Also, there was a
typo in your keypress code (scroll_to should be scroll_top). Here's a
version that worked for me. Someone should add this sort of code to
the Shoes console, so we always see the latest debug or error
messages...
- BG
=======================================
Shoes.app(
:title => 'Scroll Test',
:width => 600,
:height => 100,
:resizable => true
) {
# Initialize output area
@output_stack = stack :scroll => true, :width => 1.0, :height => 1.0
test_text = "Blah\nBlah\nBlah"
keypress do |k|
@output_stack.append { para test_text }
@output_stack.scroll_top = @output_stack.scroll_max
end
}
=======================================
On Oct 5, 2008, at 9:29 PM, Mike Cantelon wrote:
Hi all,
I'm using Shoes (for Linux, shoes-0.r925 on Ubuntu). I'm trying to
create something that scrolls to the bottom of the window after each
keypress (using @output_stack.scroll_to = @output_stack.scroll_max
to do the scrolling). It doesn't actually do the scrolling, though,
and I'm wondering what I'm doing wrong. Here's the code:
Shoes.app(
:title => 'Scroll Test',
:width => 600,
:height => 100,
:resizable => true
) {
# Initialize output area
@output_stack = stack
test_text = "Blah\nBlah\nBlah"
keypress do |k|
@output_stack.append { para test_text }
@output_stack.scroll_to = @output_stack.scroll_max
end
}
Cheers,
Mike