ruby-****@sourc*****
ruby-****@sourc*****
2012年 11月 21日 (水) 14:11:43 JST
------------------------- REMOTE_ADDR = 184.145.95.170 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-mnstbs-tb ------------------------- @@ -561,10 +561,10 @@ - :Providing extra drag-sensitive spot on the toolbar: - Perhaps you remember we mentioned that users may find discovering a 'dnd-sensitive' spot on a toolbar a bit tricky. Well, we can alleviate this problem by turning one of the toolbar items into 'auxiliary drag-and drop handle'. {{image_left("menui-as-aux-drag-sensitive-spot.png")}} In our 'dnd-toolbox.rb' example program we did this to our tool button with the the 'baby-GNU' image labelled 'My stuff' (see the small image on the left). You can initiate dragging on that button, by keeping your mouse button pressed while dragging, or you may merely click on it to invoke its normal action. This is accomplished by setting the 'use_drag_window' property on tool-item object: + Perhaps you remember we mentioned that users may find discovering a 'dnd-sensitive' spot on a toolbar a bit tricky. Well, we can alleviate this problem by making a toolbar item that will be used as an 'auxiliary drag-and drop handle'. {{image_left("menui-as-aux-drag-sensitive-spot.png")}} In our 'dnd-toolbox.rb' example program you can do this by turning our tool button with the the 'baby-GNU' image labelled 'My stuff' into such a handle (see the small image on the left). However this will make this tool-button useless for any other actions, you may have planed for it before. You can try it out by uncommenting the 'my_stuff.use_drag_window = true' in our example program. Search for the following code segment. # -- Provide additional drag-sensitive spot on the toolbar ---- - my_stuff.use_drag_window = true + # However the original intent (action) of this button is lost!!! + #my_stuff.use_drag_window = true