shoes3
shoes3 copied to clipboard
edit_box does not support scrollbar related methods
Shoes edit_box does not respond to scroll_top, scroll_max, scroll_height, scroll and gutter.
Shoes.app {
@p = para
stack do
[edit_line, edit_box].each { |n|
[:scroll_top, :scroll_max, :scroll_height, :scroll, :gutter].each { |m|
@p.text += "#{n.class}##{m}: #{n.respond_to?(m)}\n"
}
@p.text += "\n"
}
end.hide
}
I can't find anywhere in the manual that suggests these work. I'm assuming this an enhancement request.
By definition there is nothing to scroll in an edit_line.
By definition there is nothing to scroll in an edit_line.
Agreed on edit_line. However, it is a normal behaviour (any GUI) to provide support for a scrollbar on an edit_box. The text can easily overflow and it would be a struggle to edit in such edit box without a scrollbar.
Shoes.app do
@a = edit_box :height => 100
str = ""
10.times {|i| str << "Line #{i}\n"}
@a.text = str
button "Display" do
para @a.text
end
end
A scroll bar appears. You can edit the text.
True. Let's go back on the original topic for a second: Shoes edit_box does not respond to scroll_top, scroll_max, scroll_height, scroll and gutter. There is no way to know anything about that said scrollbar.
I'd like an option to autoscroll (if needed) but that's different. Serious question. What would you do if you knew the edit_box has or doesn't have a scroll bar? What ever that reason is - can you detect that condition in the block attached to the edit_box?
Something I've learned with the 3.2.24 console is that edit box could behave much more like a multi-line text editor window (both gtk and osx). It's a lot code to implement and we'd have to add some methods/styles/procs to Shoes - perhaps it would be better to just create a new control for Shoes so don't have compatibility issues to deal with.
Partially addressed in #146. Good enough?