Displaying 7 results from an estimated 7 matches for "menu_file".
Did you mean:
end_file
2008 Jan 04
2
problem with Menu.append_check_item()
...9;'
load ''wx''
rescue
raise no_wx_err
end
end
include Wx
class MinimalFrame < Wx::Frame
def initialize(title)
# The main application frame has no parent (nil)
super(nil, :title => title, :size => [ 700, 400 ])
menu_bar = Wx::MenuBar.new
menu_file = Wx::Menu.new
item1 = menu_file.append(1000, "Test Item 1")
item2 = menu_file.append_check_item(1001, "Test Checked Item")
puts item1
puts item2
menu_bar.append(menu_file, "Test1")
self.menu_bar = menu_bar
end
end
Wx::App.run do
self.ap...
2006 Sep 17
1
run.rb
This is a first stab at a run.rb file that will let you run a sample in
the bigdemo directory by itself.
You have to add the following to the bottom of every sample file:
if __FILE__ == $0
load "run.rb"
run(File.basename($0))
end
Roy
_______________________________________________
wxruby-users mailing list
wxruby-users@rubyforge.org
2007 Nov 18
2
Issues adding sub-menu items
...9;'m I missing. I appreciate your response.
Thanks,
Glenn
#!/usr/bin/env ruby
begin
....
....
....
class HL7Query < Wx::Frame
def initialize(title)
super(nil, :title => title, :size => [ 850, 600 ])
menu_bar = Wx::MenuBar.new
# The "file" menu
menu_file = Wx::Menu.new
menu_file.append(Wx::ID_EXIT, "E&xit\tAlt-X", "Quit this program")
menu_bar.append(menu_file, "&File")
# The "Tools" menu
menu_tools = Wx::Menu.new
#menu_tools.append(Wx::ID_UNIQUEFIELDS, "Find Unique Fields&qu...
2006 Apr 27
5
Major Breakthrough?
Attached are patches to make the textctrl.rb sample work fully. Note
the new %directorargout typemap I added to fix wxWindows calling into
SWIG. I don''t know if this can fix all such problems or not. Let me
know what you think.
I also rubified the sample a little bit more. Also, note that I fix the
<< operator so the function can be called. I hope I did this right.
Roy
2006 Nov 06
3
HtmlWindow and friends
Hi
Attached is a patch to add HtmlWindow and some of its friends, including
HtmlEasyPrinting. Also a sample.
I haven''t tried exposing the parsing and rendering API yet to allow
custom tags etc - I just wanted to get basic HTML and the 0.6.0
compatibility classes first. There may well be some quite easy classes left.
There''s one ugly kludge to get OnOpeningURL to compile -
2007 Sep 27
10
Adding more sugar to wxSugar
...super *args
end
end
Given these simple additional classes, the minimal app sample can be
written like this :
CandyApp.create do
self.app_name = ''Minimal''
frame = CandyFrame.create(nil, :title => "Minimal wxRuby App",
:size => [ 400, 300 ]) do
menu_file = Wx::Menu.new()
menu_help = Wx::Menu.new()
menu_help.append(Wx::ID_ABOUT, "&About...\tF1", "Show about dialog")
menu_file.append(Wx::ID_EXIT, "E&xit\tAlt-X", "Quit this program")
menu_bar = Wx::MenuBar.new()
menu_bar.app...
2006 Nov 12
0
[724] trunk/wxruby2: Initial commit of HtmlWindow functionality
...html_win = MyHtmlWindow.new(self, -1)
+ @html_win.set_related_frame(self, ''HTML Window: %s'')
+ @html_win.set_related_status_bar(2)
+ @html_win.set_page(DATA.read)
+ sizer.add(@html_win, 1, Wx::ALL|Wx::GROW, 4)
+ self.set_sizer(sizer)
+ end
+
+ def setup_menus
+ menu_file = Wx::Menu.new()
+ menu_help = Wx::Menu.new()
+ # Using Wx::ID_ABOUT default id means the menu item will be placed
+ # in the correct platform-specific place
+ menu_help.append(Wx::ID_ABOUT, "&About...\tF1", "Show about dialog")
+ menu_file.append(Wx::ID_OPEN,...