Ruby Shoes - Subpane窗口中的滚动条

时间:2008-11-09 00:53:46

标签: ruby shoes

我似乎无法在内部堆栈/流程中使用滚动条。有谁知道怎么做?

3 个答案:

答案 0 :(得分:5)

只需修复高度并添加“:scroll => true”参数:

Shoes.app(:title => "Scrolll!" ) do
  flow :margin => 10 do
    stack :width => "150px", :height => "200px", :scroll => true do
      para  "all you need is love",  "all you need is love", "all you need is love", "all you need is love", "all you need is love", "all you need is love", "all you need is love", "all you need is love", "all you need is love", "all you need is love",
    end
  end
end

答案 1 :(得分:1)

您可以使用<div>标记,然后使用CSS:

#my_div {
 width: [some_width]px;
 height: [some_height]px;
 overflow: auto;
}

答案 2 :(得分:-1)

我不确定“内部堆栈/流程”究竟是什么意思,但我们使用iframe来处理子窗口,这些窗口具有您可以设置的滚动属性。否则,您可以使用像YUI这样的javascript框架来获取可以允许滚动功能的子窗格。