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

Reply via email to