[ruby-gnome2-doc-cvs] [Hiki] update - tips_layout_example

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2004年 5月 25日 (火) 01:14:07 JST


-------------------------
REMOTE_ADDR = 200.216.155.90
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp//?tips_layout_example
-------------------------
  {{link nil, "Ruby-GNOME2+Tips", nil, nil}}
  
  =How to use the mouse to move widgets in a Layout container
  
  Most of the layout containers have the responsibility of positioning the widgets that are put into them. But there is an exception: the Layout container. With a Layout container, you can determine the x,y coordinates of the widget. Thus, by using the mouse and its x,y pointer, it's possible to position the widget wherever you want it inside the Layout container.
  
  Not all widgets can receive mouse events by default. Those that can, have a window handle. If a widget does not have a window handle, and you want it to receive some events that it doesn't, then you should put the widget in an EventBox, and use that as the source of the events. An EventBox does have a window handle.
  
  If the widget that has a window handle isn't receiving the events, then the following method call on it should make it receive them.
  
   set_events(Gdk::Event::ALL_EVENTS_MASK)
+ 
+ This is a screenshot of this example:
+ 
+ ((<Layout Example|URL:/ja/hiki.cgi?c=plugin;plugin=attach_download;p=tips_layout_example;file_name=layout_example.png>))
+ {{br}}





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