search for: set_menu_bar

Displaying 20 results from an estimated 23 matches for "set_menu_bar".

2008 May 11
2
instabilities in wxRuby 1.9.6
...nt super(parent, -1, "Child frame") viewMenu = Wx::Menu.new viewMenu.append(Wx::ID_CLOSE, "Close\tCtrl-W", "Close this window") evt_menu(Wx::ID_CLOSE) { show false } menuBar = Wx::MenuBar.new menuBar.append(viewMenu, "&View") set_menu_bar menuBar end end class TestFrame < Wx::Frame def initialize super(nil, -1, "Test Frame") menu = Wx::Menu.new menuItem = Wx::MenuItem.new(menu, -1, "Show child") menu.append_item menuItem evt_menu(menuItem) { ChildFrame.new(self).show } menuBar =...
2008 May 20
0
[ wxruby-Bugs-20255 ] Instabilities on Linux - 1.9.7
...nt super(parent, -1, "Child frame") viewMenu = Wx::Menu.new viewMenu.append(Wx::ID_CLOSE, "Close\tCtrl-W", "Close this window") evt_menu(Wx::ID_CLOSE) { show false } menuBar = Wx::MenuBar.new menuBar.append(viewMenu, "&View") set_menu_bar menuBar end end class TestFrame < Wx::Frame def initialize super(nil, -1, "Test Frame") menu = Wx::Menu.new menuItem = Wx::MenuItem.new(menu, -1, "Show child") menu.append_item menuItem evt_menu(menuItem) { ChildFrame.new(self).show } menuBar =...
2006 Jul 24
6
MiniFrame.i
Hi Another little patch, adding MiniFrame (a frame with small title bar and buttons which doesn''t appear in the desktop taskbar). Also a sample - not very interesting, happy to roll this into something else if that''s better. cheers alex _______________________________________________ wxruby-users mailing list wxruby-users@rubyforge.org
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
2004 May 03
1
Sub-menus?
Hey guys, I have been trying unsuccessfully to create a menu that holds "sub-menus". To clarify, I want something along the lines of when you click on a File menu, then see the "New" menu, which you can click on to open a new layer of menus. Is this supported yet in WxRuby? Robert _________________________________________________________________ Getting married? Find
2004 Mar 16
0
MDI and submenues
...u1 = Menu.new @submenu1.append(1, "item 1") @item_with_submenu1 = MenuItem.new(@fileMenu, 2, ''&Submenu 1'', '''', ITEM_NORMAL, @submenu1) @fileMenu.append_item( @item_with_submenu1 ) #>> set_menu_bar( @menuBar ) end end class RbApp < App def on_init frame = MyFrame.new("MDI parent") frame.show(TRUE) end end a = RbApp.new a.main_loop #================================================
2007 Mar 20
0
[903] branches/wxruby2/wxwidgets_282/samples: Added #!/usr/bin/env ruby to the grid sample.
...39;') - evt_menu(1004) { @grid.select_col(3) } - sel_menu.append(1005, ''Select block'', ''Select block'') - evt_menu(1005) { @grid.select_block(1, 1, 6, 3) } - menu_bar = Wx::MenuBar.new - menu_bar.append(sel_menu, ''Select'') - set_menu_bar(menu_bar) - - make_grid(self) - sizer.add(@grid, 1, Wx::ALL|Wx::GROW, 4) - set_sizer(sizer) - - evt_grid_cell_left_click() do |evt| - set_status_text("#{evt.get_row} x #{evt.get_col} is clicked") - evt.skip - end - - evt_grid_cell_right_click() do |evt| -...
2007 Sep 05
6
centering MessageDialog
Hi, is there any way to center the default Wx::MessageDialog or Wx::message_box on parent (owner) instead of screen? I haven''t found any constant other than Wx::DEFAULT_POSITION. thanks for your help. fabio. _______________________________________________ wxruby-users mailing list wxruby-users@rubyforge.org http://rubyforge.org/mailman/listinfo/wxruby-users
2006 Oct 21
0
[698] trunk/wxruby2/samples/bigdemo/MDIDemo.rbw: Removed broken background stuff to stop crash on OS X (tho still crashes
...quot;) </span><span class="cx"> </span><span class="cx"> menubar = Wx::MenuBar.new() </span><span class="cx"> menubar.append(menu, "&File") </span><span class="cx"> set_menu_bar(menubar) </span><span class="cx"> </span><del>- create_status_bar() </del><ins>+ create_status_bar </ins><span class="cx"> </span><span class="cx"> evt_menu(5000) {|even...
2004 Aug 25
7
problem subclassing Wx::Menu
...Ctrl-Q") # frame.evt_menu(999) { | e | p "QUX" } @menu_foo = EasyMenu.new(frame) @menu_foo.add_menu_item("&Qux", "Ctrl-Q") { | e | p "QUX" } menu_bar = Wx::MenuBar.new() menu_bar.append(@menu_foo, "&Foo") frame.set_menu_bar(menu_bar) frame.show(TRUE) end end MyApp.new.main_loop()
2007 Feb 14
0
[875] trunk/wxruby2/samples: Add expanded grid sample
...39;') + evt_menu(1004) { @grid.select_col(3) } + sel_menu.append(1005, ''Select block'', ''Select block'') + evt_menu(1005) { @grid.select_block(1, 1, 6, 3) } + menu_bar = Wx::MenuBar.new + menu_bar.append(sel_menu, ''Select'') + set_menu_bar(menu_bar) + + make_grid(self) + sizer.add(@grid, 1, Wx::ALL|Wx::GROW, 4) + set_sizer(sizer) + + evt_grid_cell_left_click() do |evt| + set_status_text("#{evt.get_row} x #{evt.get_col} is clicked") + evt.skip + end + + evt_grid_cell_right_click() do |evt| +...
2004 May 22
4
couple of questions
Hi folks A couple of questions: 1) I seem to get funny artifacts in the display of TreeCtrl, ComboBox and ListBox when the MDI child frame containing it is first painted (see attached - it should be two-root treeview, unopened). I''m not sure if it''s related to being in a MDI, but the controls sample looks OK. The artifacts are cleared up when it''s repainted or
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
2004 Aug 07
1
end_modal question
Really stupid question, but have you wrapped this all in an App class? If you don''t have a wxApp subclass driving your applications then all sorts of badness would happen. > I''m writing a custom little application for my boss''s high school > football team to track there stats play by play. > > My problem is that when I start the application, it
2004 Jan 08
3
pictorG
...am" # Help menu menuHelp = Menu.new menuHelp.append(ID_ABOUT,"&About\tCtrl-F1","Show program information") # the Menubar menuBar = MenuBar.new menuBar.append menuFile, "&File" menuBar.append menuHelp, "&Help" set_menu_bar menuBar # Toolbar toolBar = create_tool_bar TB_HORIZONTAL&TB_FLAT&TB_TEXT, ID_TOOLBAR toolBar.add_tool ID_ABOUT, "Help", Bitmap.new("bitmaps/help.xpm"), "Get help" toolBar.realize() ToolTip.enable true # Frame (splitter inside) sp...
2007 Sep 27
10
Adding more sugar to wxSugar
...bout...\tF1", "Show about dialog") menu_file.append(Wx::ID_EXIT, "E&xit\tAlt-X", "Quit this program") menu_bar = Wx::MenuBar.new() menu_bar.append(menu_file, "&File") menu_bar.append(menu_help, "&Help") set_menu_bar(menu_bar) create_status_bar(2) set_status_text("Welcome to wxRuby!") evt_menu Wx::ID_EXIT, :on_quit evt_menu Wx::ID_ABOUT, :on_about end frame.show end I find it very readable and less tedious to write (see the attached source files). What do you think...
2006 Jul 25
6
Wizards
Hi Please find attached a set of patches and swig files to implement Wizards for wxruby. Also a brief sample. Quick q - the C declarations of evt_xxx_xxx methods and their attaching to Ruby classes seems to be duplicated across Events.i and EvtHandler.i - is one of these the right place to be adding them? or both? Thanks alex _______________________________________________
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 -
2008 Feb 17
15
A bug in wxRuby. Segmentation fault in random situations.
Hello, I wrote an application in wxRuby: ruby 1.8.6 wxruby 1.9.4 installed from gem windows xp sp2 After several minutes of running it crashes with the following error: "c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27: [BUG] Segmentation fault ruby 1.8.6 (2007-03-13) [i386-mswin32] This application has requested the Runtime to terminate it in an unusual way. Please contact
2006 Nov 13
7
[736] trunk/wxruby2/samples/dialogs/dialogs.rb: Fixed crashing bug in on_paint and made the code style more Ruby like.
...> </span><span class="cx"> dlg.destroy() </span><span class="lines">@@ -709,8 +708,8 @@ </span><span class="cx"> menu_bar.append(file_menu, "&File") </span><span class="cx"> frame.set_menu_bar(menu_bar) </span><span class="cx"> </span><del>- $myCanvas = MyCanvas.new(frame) - $myCanvas.set_background_colour(WHITE) </del><ins>+ $my_canvas = MyCanvas.new(frame) + $my_canvas.set_background_colour(WHITE) </ins><span class=&qu...