使用 wxRuby 创建 GUI 应用程序

2015-05-06 0 788
使用 wxRuby 创建 GUI 应用程序
#!/usr/bin/ruby -w
require 'wxruby'
class TroutApp < Wx::App
  def on_init
    frame = Wx::Frame.new(nil, -1, 'Tiny wxRuby Application')
    panel = Wx::StaticText.new(frame, -1, 'You are a trout!', 
                               Wx::Point.new(-1,1), Wx::DEFAULT_SIZE, 
                               Wx::ALIGN_CENTER)
    frame.show
  end
end

TroutApp.new.main_loop

遇见资源网 ruby 使用 wxRuby 创建 GUI 应用程序 http://www.ox520.com/16342.html

常见问题

相关文章

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

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