Last active
December 9, 2018 09:36
-
-
Save kojix2/ee16f63cdf76cd0121ecdd46eeae5d8a to your computer and use it in GitHub Desktop.
Rubyでメニューバーを作る ref: https://qiita.com/kojix2/items/525f31f9e61158ec691f
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'gtk3' | |
def on_shimane_clicked | |
puts "島根県が選択されました" | |
end | |
b = Gtk::Builder.new(file: "sample.glade") | |
w = b.get_object "win" | |
b.connect_signals{|handler| method(handler)} | |
w.signal_connect(:destroy){Gtk.main_quit} | |
w.show_all | |
Gtk.main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruby menu.rb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
島根県が選択されました |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment