search for: on_button

Displaying 7 results from an estimated 7 matches for "on_button".

2004 May 12
8
New tutorial added!
Hey guys, It''s been awhile, but I''ve put up a new tutorial page on Wx::Frame. It''s the first half of the tutorial on Frame, the rest will come a little later. Let me know what you guys think. Any comments or criticisms are welcome. Let me know what was good and what could have been better, so that future tutorials will be able to incorporate those improvements.
2007 Aug 22
2
Can''t change button-size?
...include Wx class MyFrame < Frame def initialize super(nil, -1, "Threepwood",Point.new(400,250),Size.new(600,200),DEFAULT_FRAME_STYLE) button = Button.new(self, -1, "Push me",Point.new(10,10),Size.new(50,10)) evt_button(button.get_id()) {|event| on_button(event)} show() end def message(text, title) m = Wx::MessageDialog.new(self, text, title, Wx::OK | Wx::ICON_INFORMATION) m.show_modal() end def on_button(event) message("event recieved!!", "Button event") end end cl...
2006 Oct 21
3
wxsugar question
I''ve only had the briefest play with wxSugar and already I like it a lot. One small question - have you considered some more ''convention over configuration'' like they do in rails, in particular for event connectors? So instead of listen(:button, my_button, my_button_pressed) you can leave it out entirely and rely on the convention that a button has a _pressed
2006 Dec 12
0
[782] trunk/wxruby2/samples/bigdemo: HtmlHelpWindow sample with helpfile
...def initialize(parent, log) + super(parent, -1, Wx::DEFAULT_POSITION, Wx::DEFAULT_SIZE, + Wx::NO_FULL_REPAINT_ON_RESIZE) + @log = log + + b = Wx::Button.new(self, -1, ''Give me some help!'', + Wx::Point.new(50,50)) + + evt_button(b.get_id) { on_button } + end + + def on_button + help = Wx::HtmlHelpController.instance + help_file = File.join( File.dirname(__FILE__), ''helpfile.htb'') + exit if not File.exists?(help_file) + help.add_book( File.expand_path(help_file), false ) + help.display_contents + end +end +...
2006 Sep 07
2
A little bit of sugar
Hi Do a search on ''wxruby'' and you''ll see that people''s main gripes are 1) stability 2) development progress 3) documentation and 4) syntax. We''re making great progress on 1-3 so thought it seemed like a good time to start looking at 4). So here''s announcing a first release of WxSugar. It can be downloaded via gems (gem install wx_sugar)
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.
...set_focus() - @m_btnFocused.set_default() </del><ins>+ @btn_focused.set_focus() + @btn_focused.set_default() </ins><span class="cx"> </span><del>- evt_button(-1) {|event| onButton(event) } </del><ins>+ evt_button(-1) {|event| on_button(event) } </ins><span class="cx"> end </span><span class="cx"> </span><del>- def onButton(event) </del><ins>+ def on_button(event) </ins><span class="cx"> id = event.get_id </span><span class=...
2006 Dec 03
0
[778] trunk/wxruby2: Remove broken and deprecated LayoutConstraints, update samples & docs
...in - require ''rubygems'' - require ''wx'' - rescue LoadError - raise no_wx_err - end -end - -class TestLayoutConstraints < Wx::Panel - def initialize(parent) - super(parent, -1) - set_auto_layout(true) - evt_button(100) {|event| on_button(event)} - - set_background_colour(Wx::Colour.new("MEDIUM ORCHID")) - - @panelA = Wx::Window.new(self, -1, Wx::DEFAULT_POSITION, Wx::DEFAULT_SIZE, Wx::SIMPLE_BORDER) - @panelA.set_background_colour(Wx::BLUE) - txt = Wx::StaticText.new(@panelA, -1...