ruby-****@sourc*****
ruby-****@sourc*****
2012年 11月 9日 (金) 11:32:27 JST
------------------------- REMOTE_ADDR = 184.145.95.170 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-mnstbs-tb ------------------------- @@ -47,16 +47,11 @@ tb.insert(3, separator) tb.insert(4, selectall) - cut.signal_connect('clicked') { ent.cut_clipboard } - copy.signal_connect('clicked') { ent.copy_clipboard } - paste.signal_connect('clicked') { ent.paste_clipboard } - selectall.signal_connect('clicked') { select_all(ent) } - end - - # Select all of the text in the GtkEditable. - def select_all(edit) - # Gtk::Editable#select_region - edit.select_region(0, -1) + cut.signal_connect('clicked') { ent.cut_clipboard; p "Cut" } + copy.signal_connect('clicked') { ent.copy_clipboard; p "Copy" } + paste.signal_connect('clicked') { ent.paste_clipboard; p "Paste" } + # Select all of the text in the editable (Gtk::Editable#select_region) + selectall.signal_connect('clicked') { ent.select_region(0, -1); p "Sel. All" } end window = Gtk::Window.new("Toolbars")