ruby-****@sourc*****
ruby-****@sourc*****
2009年 2月 3日 (火) 23:37:18 JST
------------------------- REMOTE_ADDR = 74.15.84.244 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-txtw-scrolledwin ------------------------- @@ -89,7 +89,7 @@ window.show_all Gtk.main -Te scrolled window is simply a container with scrollbars. Neither the container nor the scrollbars perform any action by themselves. Scrolling is handled by the child widget, which is why the child widget must have a scrolling support. As you know by now, most GTK+ widgets originally do not include such support - we mentioned only five that do. For all others scrolling behaviour is added via portview. Adjustments are also tightly related to scrolling. When you add a child widget with scrolling support to a scrolled window adjustments for both x and y axis are added. If the child does not have scrolling capabilities nothing will happen, which is why widgets without these capabilities are first added to a viewport. Since viewport does not have any scrollbars the adjustments must be added to it: +The scrolled window is simply a container with scrollbars. Neither the container nor the scrollbars perform any action by themselves. Scrolling is handled by the child widget, which is why the child widget must have a scrolling support. As you know by now, most GTK+ widgets originally do not include such support - we mentioned only five that do. For all others scrolling behaviour is added via portview. Adjustments are also tightly related to scrolling. When you add a child widget with scrolling support to a scrolled window adjustments for both x and y axis are added. If the child does not have scrolling capabilities nothing will happen, which is why widgets without these capabilities are first added to a viewport. Since viewport does not have any scrollbars the adjustments must be added to it: viewport = Gtk::Viewport.new(horizontal, vertical)