ruby-****@sourc*****
ruby-****@sourc*****
2012年 9月 14日 (金) 04:52:23 JST
------------------------- REMOTE_ADDR = 184.145.80.187 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-txtw-scrolledwin ------------------------- @@ -62,7 +62,7 @@ {{image_right("scroll-w-help-of-wport.png")}} - This program displays hundred buttons in a table widget, which does not have native scrolling abilities, therefore we need to first add the table to a viewport widget, and only then add the wiewport to scrolled window. As mentioned this is the long way of using viewport. We could instead just use the Gtk::ScrolledWindow#add_with_viewport(child) instance method. The two approaches can be seen in the listing between the "-- (start/end)" comment lines, Where indeed, the short way is commented out. This part of the program is only needed when the widget you are adding to scrolled window does not include native support for scrolling. + This program displays hundred buttons in a table widget, which does not have native scrolling abilities, therefore we need to first add the table to a viewport widget, and only then add the wiewport to scrolled window. As mentioned this is the long way of using viewport. We could instead just use the Gtk::ScrolledWindow#add_with_viewport(child) instance method. The two approaches can be seen in the listing between the "-- (start/end)" comment lines, where indeed, the short way is commented out. This part of the program is only needed when the widget you are adding to scrolled window does not include native support for scrolling.