Ruby/GTK 版本的 "Hello, World" 程序

2015-07-18 0 863
Ruby/GTK 版本的 "Hello, World" 程序
require 'gtk'

window = Gtk::Window::new
button = Gtk::Button::new("Hello, World!")
button.signal_connect(Gtk::Button::SIGNAL_CLICKED) {
  puts "Goodbye, World!"
  exit
}
window.add(button)
button.show
window.show
Gtk::main

遇见资源网 ruby Ruby/GTK 版本的 "Hello, World" 程序 http://www.ox520.com/16404.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务