[ruby-gnome2-doc-cvs] [Ruby-GNOME2 Project Website] update - tut-gtk2-txtw-scrolledwin

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2012年 9月 14日 (金) 07:14:20 JST


-------------------------
REMOTE_ADDR = 184.145.80.187
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-txtw-scrolledwin
-------------------------
@@ -161,7 +161,20 @@
 
 One additional decision you often would like to make when setting up a scrolled window is to specify when the scrollbars will be visible. This is accomplished with Gtk::ScrolledWindow#set_policy(hscrollbar_policy, vscrollbar_policy). The policy arguments take one of the values defined in ((<GtkPolicyType|Gtk#GtkPolicyType>)). Though unlikely, another thing you may wish to set is the placement of the scrollbars. For that you have Gtk::Scrollbar#window_placement=(window_placement) method at your disposal. Look for the correct argument values at ((<GtkCornerType|Gtk#GtkCornerType>)).
 
-After you have setup a scrolled window you should add a child widget which you intend to slide around with your scrollbars. There are two possible ways of doing this, and the method is chosen based on the type of child widget. If you are adding to your scrolling window a Gtk::TextView, Gtk::TreeView, Gtk::IconView, or Gtk::Layout widget you should use Gtk::Container#add method, since all five of these containers include native scrolling support.
+After you have setup a scrolled window you should add a child widget which you intend to slide around with your scrollbars. There are two possible ways of doing this, and the method is chosen based on the type of child widget. If you are adding to your scrolling window a Gtk::TextView, Gtk::TreeView, Gtk::IconView, or Gtk::Layout widget you should use Gtk::Container#add method, since all five of these containers include native scrolling support. For your convenience I list them also here:
+
+
+
+:GtkCornerType:
+
+    Specifies which corner a child widget should be placed in when packed into a Gtk::ScrolledWindow. This is effectively the opposite of where the scroll bars are placed.
+
+        * ((*CORNER_TOP_LEFT*)) - Place the scrollbars on the right and bottom of the widget (default behaviour).
+        * ((*CORNER_BOTTOM_LEFT*)) - Place the scrollbars on the top and right of the widget.
+        * ((*CORNER_TOP_RIGHT*)) - Place the scrollbars on the left and bottom of the widget.
+        * ((*CORNER_BOTTOM_RIGHT*)) - Place the scrollbars on the top and left of the widget. 
+
+
 
 All other GTK+ widgets, such as our Gtk::Table, which do not have scrolling support, you must first add to a Gtk::Viewport widget, and then add the Gtk::Viewport to the scrolled window. This longer method of adding a widget without the scrolling support to the scrolled window, demonstrates precisely what happens, when you use a convenience method Gtk::ScrolledWindow#add_with_viewport, which does exactly what we have just described. Namely, it adds the scrolling ability to a child widget such as for instance to our table, adds it (the table) to the viewport, and finally adds this viewport with the child (table) to the scrolling window.
 




ruby-gnome2-cvs メーリングリストの案内
Back to archive index