Displaying 2 results from an estimated 2 matches for "id_yes".
2009 Nov 28
1
'Are you sure?' custom dialog not exiting cleanly
...out this mini program
if you wish to create sample1.rb . Thank you.
-Philip
=========== asample1.rb ====================================================
require ''wx''
require ''sample1.rb''
class DIA_Frame < DiaFrame
def on_init
set_affirmative_id(Wx::ID_YES)
set_escape_id(Wx::ID_NO)
end
end
class Main_Frame < MainFrame
def on_init
evt_close { confirm_closure }
evt_button(@m_butexit) {self.close}
end
def confirm_closure
dlg = DIA_Frame.new
if(dlg.show_modal==Wx::ID_YES) then
dlg.end_modal(Wx::ID_YES)
sel...
2007 Mar 23
0
[918] branches/wxruby2/wxwidgets_282/samples/aui/aui.rb: Fix a couple of little bugs and typos
..."Are you sure you want to close/hide this pane?"
</span><span class="cx"> dlg = Wx::MessageDialog.new(self, msg, "Wx::AUI", Wx::YES_NO)
</span><del>- if dlg.show_modal !- Wx::YES
</del><ins>+ if dlg.show_modal != Wx::ID_YES
</ins><span class="cx"> return event.veto
</span><span class="cx"> end
</span><span class="cx"> end
</span><span class="lines">@@ -1046,7 +1047,7 @@
</span><span class="cx"&g...