ruby-****@sourc*****
ruby-****@sourc*****
2012年 9月 1日 (土) 08:38:01 JST
------------------------- REMOTE_ADDR = 70.49.49.99 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-txtw-scrolledwin ------------------------- @@ -90,7 +90,7 @@ window.show_all Gtk.main -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 a 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 a support - we mentioned only five that do. For all these widgets scrolling behaviour is added with the help of 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)