search for: id_cancel

Displaying 12 results from an estimated 12 matches for "id_cancel".

2004 Jun 19
4
FlexGridSizer question
..., Wx::ALL, 5) button = Wx::Button.new(self, Wx::ID_OK, ''OK'', Wx::Point.new(0,0),Wx::Size.new(70,25)) button.evt_button(Wx::ID_OK){|event| onDoOK()} sizer.add(button, 0, Wx::SOUTH|Wx::WEST|Wx::EAST, 10) button = Wx::Button.new(self, Wx::ID_CANCEL, ''Cancel'', Wx::Point.new(0,0),Wx::Size.new(70,25)) button.evt_button(Wx::ID_CANCEL){|event| onDoCancel()} sizer.add(button, 0, Wx::SOUTH|Wx::EAST, 10) self.set_sizer(sizer) sizer.set_size_hints(self) sizer.fit(self) end def o...
2009 Oct 19
1
Problem with geometry manager in TclTK
...e, Gabriel Margarido. CODE: library(tcltk) ask.format <- function() { ask.form <- tktoplevel() tkgrab.set(ask.form) tkfocus(ask.form) tkwm.title(ask.form,"Input Format") tkwm.resizable(ask.form, 0, 0) file.format <- tclVar("1") ReturnFormat <- "ID_CANCEL" Title.frame <- tkframe(ask.form, relief="groove") tkgrid(tklabel(Title.frame,text="Input File Format", font="Times 15", foreground="dark red")) tkgrid(Title.frame) Choose.frame <- tkframe(ask.form, relief="groove", borderwidth=...
2008 Jul 18
0
Retrieving data from a tcl /tk function
...is is an answered question, but I did my homework for a long while and couldn't figure out a way to retrieve data entry from a model dialog. In one of the examples compiled by James Wettenhall: odalDialog <- function(title, question, entryInit, entryWidth = 20, returnValOnCancel = "ID_CANCEL") { dlg <- tktoplevel() tkwm.deiconify(dlg) tkgrab.set(dlg) tkfocus(dlg) tkwm.title(dlg, title) textEntryVarTcl <- tclVar(paste(entryInit)) textEntryWidget <- tkentry(dlg, width = paste(entryWidth), textvariable = textEntryVarTcl) tkgrid(tklabel...
2007 Feb 12
0
[860] trunk/wxruby2/doc/textile/fontdialog.txtl: Documentation for FontDialog was missing completely
...ntdata). FontDialog#get_font_data + + "FontData":fontdata.html *get_font_data*() + +Returns the font data associated with the font dialog. + +h3(#FontDialog_showmodal). wxFontDialog::show_modal + + Integer *show_modal*() + +Shows the dialog, returning @ID_OK@ if the user pressed Ok, and +@ID_CANCEL@ otherwise. + +If the user cancels the dialog (show_modal returns @ID_CANCEL@), no font +will be created. If the user presses OK, a new "Font":font.html will be created +and stored in the font dialog''s "FontData":fontdata.html structure. + </ins></span></...
2007 Aug 24
2
setting the font in FXText
...AME_NONE|LAYOUT_FILL_X|LAYOUT_FILL_Y|PACK_UNIFORM_WIDT H) @fxtext = FXText.new(contents, nil, 0, TEXT_READONLY|TEXT_WORDWRAP|LAYOUT_FILL_X|LAYOUT_FILL_Y) @fxtext.font = FXFont.new(getApp(), "courier", 8) # Ok button ok = FXButton.new(button, "OK", nil, self, ID_CANCEL, FRAME_RAISED|FRAME_THICK|LAYOUT_CENTER_X|LAYOUT_CENTER_Y|LAYOUT_FILL_X) ok.setDefault ok.setFocus end end However, when I add the following method to FXTextDialog and call it I get a Seg Fault!: def set_font() @fxtext.font = FXFont.new(getApp(), "courier", 8) end...
2006 Dec 23
0
[796] trunk/wxruby2/samples/xrc/xrc_sample.rb: Simplify some method calls, rubyify and add a little more explanation
...-&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp@ok = Wx::Window.find_window_by_id(Wx::xrcid(''wxID_OK''),self) - @cancel = Wx::Window.find_window_by_id(Wx::xrcid(''wxID_CANCEL''),self) -&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp@message = Wx::Window.find_window_by_id(Wx::xrcid(''SAMPLE_MESSAGE''),self) -&nbsp&nbsp&nbsp&nbsp&nbs...
2009 Apr 14
0
disappearing dialog boxes when using tcltk
...39;t know the problem.) Millions of thanks! Hua ##=============================================== ## Add Dialog Box (with only "OK" button) ##=============================================== modalDialogOK <- function(title,question,entryInit,entryWidth=10) { returnValOnCancel="ID_CANCEL" dlg <- tktoplevel() tkwm.deiconify(dlg) tkgrab.set(dlg) tkfocus(dlg) tkwm.title(dlg,title) textEntryVarTcl <- tclVar(paste(entryInit)) textEntryWidget <- tkentry(dlg,width=paste(entryWidth),textvariable=textEntryVarTcl) tkgrid(tklabel(dlg,text=" "))...
2007 Apr 14
0
[964] branches/wxruby2/wxwidgets_282/doc/textile/dialog.txtl: Fixed spelling mistake in sample.
...ss="cx"> case dlg.show_modal </span><span class="cx"> when Wx::ID_OK # user clicked ok </span><span class="cx"> ... </span><del>- when Wx::ID_CANCLE # user clicked cancel or closed the dialog </del><ins>+ when Wx::ID_CANCEL # user clicked cancel or closed the dialog </ins><span class="cx"> ... </span><span class="cx"> end </span><span class="cx"> </span></span></pre> </div> </div> </body> </html>
2007 Apr 14
0
[963] branches/wxruby2/wxwidgets_282/doc/textile/dialog.txtl: Added a few missing methods and cleaned up a bit.
...utton with this id is clicked, the dialog is closed. Also, when the user presses ESC key in the dialog or closes the dialog using the close button in the title bar, this is mapped to the click of the button with the specified id. + +By default, the escape id is the special value ID_ANY meaning that ID_CANCEL button is used if it''s present in the dialog and otherwise the button with "get_affirmative_id":dialog.html#Dialog_getaffirmativeid is used. Another special value for _id_ is ID_NONE meaning that ESC presses should be ignored. If any other value is given, it is interpreted as the...
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.
...gt;<ins>+ sizer_top = BoxSizer.new(HORIZONTAL) </ins><span class="cx"> </span><del>- @m_btnFocused = Button.new(self, -1, "Default button") - @m_btnDelete = Button.new(self, -1, "&Delete button") - btnOk = Button.new(self, ID_CANCEL, "&Close") - sizerTop.add(@m_btnFocused, 0, ALIGN_CENTER | ALL, 5) - sizerTop.add(@m_btnDelete, 0, ALIGN_CENTER | ALL, 5) - sizerTop.add(btnOk, 0, ALIGN_CENTER | ALL, 5) </del><ins>+ @btn_focused = Button.new(self, -1, "Default button") + @btn_dele...
2007 Mar 29
0
[926] branches/wxruby2/wxwidgets_282: Update Dialog wx2.6 -> wx2.8 API, remove deprecations and cruft, update doc
...sually contains either a single button allowing to close the +dialog or two buttons, one accepting the changes and the other one +discarding them (such button, if present, is automatically activated if +the user presses the @"Esc"@ key). By default, buttons with the standard +@ID_OK@ and @ID_CANCEL@ identifiers behave as expected. It is also +possible to use a button with a different identifier nstead, see +"set_affirmative_id":#Dialog_setaffirmativeid and +"set_escape_id":#Dialog_setescapeid. + +Also notice that the "create_button_sizer()":#Dialog_createbuttonsi...
2005 Aug 15
16
swig_up
Tracing down some things to add in validators and I''ve run across something that kinda bothers me... In order to implement validators you have to override the clone method. The directors seems to be set up to specifically handle this situation. However, whenever C++ calls back to the object''s methods the swig_get_up function is returning false. It seems like swig_up