Displaying 20 results from an estimated 40 matches for "show_modal".
2009 Sep 24
2
Running code after a modal dialog is shown
Hi all,
I''m looking for a way to get a block of code to execute once a modal
dialog has been displayed (via a call to show_modal.) I was hoping to
find some event that would fire when the window was shown, but the only
one that seemed vaguely promising (evt_window_create) seems to do nothing
at all, at least in my environment (Ruby 1.9.1 on Win32, wxruby 2.0.1.)
Here''s a very simple (non-modal) example, which f...
[860] trunk/wxruby2/doc/textile/fontdialog.txtl: Documentation for FontDialog was missing completely
2007 Feb 12
0
[860] trunk/wxruby2/doc/textile/fontdialog.txtl: Documentation for FontDialog was missing completely
...EvtHandler":evthandler.html
+
+"Object":object.html
+
+
+h2. See also
+
+"FontData":fontdata.html
+
+h2. Methods
+
+<div id="methods"
+
+"FontDialog.new":#FontDialog_new
+"FontDialog::get_font_data":#FontDialog_getfontdata
+"FontDialog::show_modal":#FontDialog_showmodal
+
+</div>
+
+h3(#FontDialog_new). FontDialog.new
+
+ *FontDialog.new*(%(arg-type)Window% parent)
+
+ *FontDialog.new*(%(arg-type)Window% parent, %(arg-type)FontData% data)
+
+
+Constructor. Pass a parent window, and optionally the font data object to be used to ini...
2007 Apr 14
0
[963] branches/wxruby2/wxwidgets_282/doc/textile/dialog.txtl: Added a few missing methods and cleaned up a bit.
.../span><del>- *end_modal*(%(arg-type)Integer% retCode)
</del><ins>+ *end_modal*(%(arg-type)Integer% ret_code)
</ins><span class="cx">
</span><span class="cx"> Ends a modal dialog, passing a value to be returned from the "Dialog#show_modal":dialog.html#Dialog_showmodal invocation.
</span><span class="cx">
</span><span class="cx"> h4. Parameters
</span><span class="cx">
</span><del>-* _retCode_ The value that should be returned by *ShowModal*.
</de...
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
2007 Mar 23
0
[918] branches/wxruby2/wxwidgets_282/samples/aui/aui.rb: Fix a couple of little bugs and typos
...> dlg = Wx::ColourDialog.new(@frame)
</span><del>- dlg.set_title("Cololur Picker")
</del><ins>+ dlg.set_title("Colour Picker")
</ins><span class="cx">
</span><span class="cx"> return unless dlg.show_modal == Wx::ID_OK
</span><span class="cx">
</span><span class="cx"> var = nil
</span><span class="cx"> case event.get_id()
</span><del>- when ID_BackgroundColor
</del><ins>+ when ID_BackgroundCol...
2004 Dec 22
2
(no subject)
Hi,
While running the sample application controls/control.rbw I
encountered the following
error:
controls.rbw:1064:in `onAbout'': undefined method `free'' for
#<Wx::BusyCursor:0x2
827db0> (NoMethodError)
from controls.rbw:1039:in `initialize''
from controls.rbw:1039:in `call''
from controls.rbw:1164:in `main_loop''
2007 Oct 09
3
Trouble with dialog based application
...lo World")
Wx::StaticText.new(helloframe, "Hello World")
helloframe.show
end
end
HelloWorld.new.main_loop
puts "exit from application"
If the frame is replaced by a dialog, the application seems to be
closed but the message is never output.
I tried both show and show_modal to display the window.
require "wx"
class HelloWorld < Wx::App
def on_init
hellodlg = Wx::Dialog.new(nil, "Hello World")
Wx::StaticText.new(hellodlg, "Hello World")
hellodlg.show_modal
# hellodlg.show
end
end
HelloWorld.new.main_loop
puts "...
2009 Nov 28
1
'Are you sure?' custom dialog not exiting cleanly
...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)
self.destroy
end
end
end
class MyApp < Wx::App
def on_init
main_frame = Main_Frame.new()
set_top_window(main_frame)
set_exit_on_frame_delete(true)
main_frame.show
end
end
app = MyApp.new
app.main_loop
=========...
2007 Nov 07
1
Wx::FileDialog and common dialogs
...uot; are broken.
Feature request:
Regarding all modal common dialogs (ColourDialog, DirDialog,
FileDialog), it looks like it''s currently not possible to set the style
element outside new(). For the modal ones, it would make lots of sense
to be able to set the style separately prior to show_modal:
d.style = Wx::WHAT_EVER_STYLE
Best regards,
Jari Williamsson
2007 May 19
1
Wx::FileDialog Styles are not working
The Constants for the Styles for FileDialog are not initialized to a value
and the class will not work without those, the Dialog will come up when you
call the show_modal method but the filenames are not showing up
I specifically need the values for
FD_OPEN
FD_SAVE
FD_OVERWRITE_PROMPT
FD_FILE_MUST_EXIST
but if I can''t get those then I''ll find a workaround
so far this has been the best GUI toolkit I have played with, alot easier
and more functi...
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
2007 Mar 28
0
[924] branches/wxruby2/wxwidgets_282: Changes 2.6 -> 2.8 Wx API; remove deprecated methods and update doc
...* "DirDialog#set_message":#DirDialog_setmessage
</span><span class="cx"> * "DirDialog#set_path":#DirDialog_setpath
</span><del>-* "DirDialog#set_style":#DirDialog_setstyle
</del><span class="cx"> * "DirDialog#show_modal":#DirDialog_showmodal
</span><span class="cx">
</span><span class="cx"> </div>
</span><span class="lines">@@ -80,12 +80,6 @@
</span><span class="cx">
</span><span class="cx"> R...
2007 Jul 17
0
[1115] trunk/wxruby2/samples/minimal/minimal.rb: Don''t call destroy explicitly as it causes assert failures
...th OK button
</span><span class="cx"> about_dlg = Wx::MessageDialog.new( self, msg, ''About Minimal'',
</span><span class="cx"> Wx::OK|Wx::ICON_INFORMATION )
</span><del>- about_dlg.show_modal()
-        about_dlg.destroy()
</del><ins>+ about_dlg.show_modal
</ins><span class="cx"> end
</span><span class="cx">
</span><span class="cx"> # util...
2007 Jun 28
2
Keeping GUI responsive while processing data
....to_s.strip
file2 = @file2.get_value.to_s.strip
if file1 == '''' or file2 == ''''
info = sprintf("Please make sure you have selected both files.")
dialog2 = Wx::MessageDialog.new(self, info, "Missing File?")
dialog2.show_modal()
elsif dialog.show_modal() == Wx::ID_OK
save_path = dialog.get_path()
puts save_path
puts file1
puts file2
$t = Thread.new {
ap = APBook.new
ap.run(file1, file2, save_path) ### THIS IS THE PART THAT TAKES
} ### SOME TIME...
2004 Aug 07
1
end_modal question
...) ,
> Wx::Size.new( 60 , 25 ) );
>
> cancel_btn.evt_button( cancel_btn.get_id() ){ |e| exit(0); }
> ok_btn.evt_button( ok_btn.get_id() ){ |e|
> Game.updateOpponent( input_txt.get_value() );
> popup.end_modal( Wx::ID_OK ); }
>
> popup.show_modal();
> end
>
> Any idea''s why my end_modal quits the entire application? Thanks,
>
> Zach
>
>
>
>
>
>
>
>
> _______________________________________________
> wxruby-users mailing list
> wxruby-users@rubyforge.org
> http://r...
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;<span class="cx"> colour = Colour.new(i*16, i*16, i*16)
</span><span class="cx"> data.set_custom_colour(i, colour)
</span><span class="lines">@@ -214,14 +213,14 @@
</span><span class="cx"> if dialog.show_modal() == ID_OK
</span><span class="cx"> retData = dialog.get_colour_data()
</span><span class="cx"> col = retData.get_colour()
</span><del>- $myCanvas.set_background_colour(col)
- #$myCanvas.clear()
- $myCanvas.refresh()...
2007 Mar 28
0
[925] branches/wxruby2/wxwidgets_282/doc/textile/filedialog.txtl: Improvements to doc from wxWidgets 2.8
...ileDialog#set_path":#FileDialog_setpath
</span><del>-* "FileDialog#set_style":#FileDialog_setstyle
</del><span class="cx"> * "FileDialog#set_wildcard":#FileDialog_setwildcard
</span><span class="cx"> * "FileDialog#show_modal":#FileDialog_showmodal
</span><span class="cx">
</span><span class="lines">@@ -77,8 +94,10 @@
</span><span class="cx"> %(arg-type)String% defaultDir = "",
</span><span class="cx"&g...
2004 Jun 19
4
FlexGridSizer question
...,100))
frame.show(TRUE)
btn = Wx::Button.new(frame,:btn.id,"OK",
Wx::Point.new(10,10),Wx::DEFAULT_SIZE)
btn.evt_button(:btn.id){|event| onOK()}
end
def onOK()
begin
dialog = MyDialog.new(nil)
ret = dialog.show_modal()
rescue
Wx::message_box($!.to_s,"Error")
end
end
end
app = MyApp.new
app.main_loop()
__END__
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20040619/f3047616/attachment.htm
2007 Jan 25
0
[ wxruby-Bugs-8130 ] Crash-on-exit when dialogs have been used
...e
Status: Open
Resolution: None
Priority: 3
Submitted By: Alex Fenton (brokentoy)
Assigned to: Alex Fenton (brokentoy)
Summary: Crash-on-exit when dialogs have been used
Initial Comment:
Sometimes dialogs are not getting cleaned up correctly - when a MessageDialog (for example) has been shown with show_modal, the following crash occurs on application exit
Program received signal EXC_BAD_ACCESS, Could not access memory.
0xf4000104 in ?? ()
(gdb) whe
#0 0xf4000104 in ?? ()
Cannot access memory at address 0xf4000104
Cannot access memory at address 0xf4000104
#1 0x0335d888 in wxTopLevelWindowBase::~wxTo...
2007 Nov 19
1
about fileDialog
I want to create openfile dialog and I use
@dialog = FileDialog.new(@panel, "Choose a file", "", "", ".*",
style=FD_OPEN, Point.new(312,152), Size.new(98, 23), "open")
it''s nothing happen in my frame
I want to create openfileDialog at button
how can I create it??
--
Posted via http://www.ruby-forum.com/.