Sha256: 0dca219add91d1e180d8c225be9a7f7cbfe5f5e22a35f776b4dc6790ef87799b

Contents?: true

Size: 1.31 KB

Versions: 12

Compression:

Stored size: 1.31 KB

Contents

#!/usr/bin/env ruby
# wxRuby2 Sample Code. Copyright (c) 2004-2008 wxRuby development team
# Freely reusable code: see SAMPLES-LICENSE.TXT for details
begin
  require 'rubygems' 
rescue LoadError
end
require 'wx'



class TestPanel < Wx::Panel
    def initialize(parent, log)
        @log = log
        super(parent, -1)
        
        b1 = Wx::Button.new(self, -1, "MDI demo")
        evt_button(b1.get_id) {|event| show_mdi_demo(event)}
        
        box = Wx::BoxSizer.new(Wx::VERTICAL)
        box.add(20,30)
        box.add(b1, 0, Wx::ALIGN_CENTER | Wx::ALL, 15)
        set_sizer(box)
    end
    
    def show_mdi_demo(event)
        mdi_demo_file = File.join( File.dirname(__FILE__), "MDIDemo.rbw")
        load mdi_demo_file
        frame = Demo::MyParentFrame.new
        frame.show
    end
end

module Demo
    def Demo.run(frame,nb,log)
        win = TestPanel.new(nb, log)
        return win
    end
    
    def Demo.overview
        "An MDI (Multiple Document Interface) parent frame is a window which can contain MDI child frames in its own 'desktop'. It is a convenient way to avoid window clutter, and is used in many popular Windows applications, such as Microsoft Word(TM)."
    end
end


if __FILE__ == $0
  run_solo_lib = File.join( File.dirname(__FILE__), 'run.rb')
  load run_solo_lib
  run File.basename($0)
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
wxruby3-0.9.2 samples/bigdemo/wxMDIWindows.rbw
wxruby3-0.9.1 samples/bigdemo/wxMDIWindows.rbw
wxruby3-0.9.0 samples/bigdemo/wxMDIWindows.rbw
wxruby3-0.9.0.pre.rc.3 samples/bigdemo/wxMDIWindows.rbw
wxruby3-0.9.0.pre.rc.2 samples/bigdemo/wxMDIWindows.rbw
wxruby3-0.9.0.pre.rc.1 samples/bigdemo/wxMDIWindows.rbw
wxruby3-0.9.0.pre.beta.14 samples/bigdemo/wxMDIWindows.rbw
wxruby3-0.9.0.pre.beta.13 samples/bigdemo/wxMDIWindows.rbw
wxruby3-0.9.0.pre.beta.11 samples/bigdemo/wxMDIWindows.rbw
wxruby3-0.9.0.pre.beta.10 samples/bigdemo/wxMDIWindows.rbw
wxruby3-0.9.0.pre.beta.9 samples/bigdemo/wxMDIWindows.rbw
wxruby3-0.9.0.pre.beta.8 samples/bigdemo/wxMDIWindows.rbw