Hi,
I’m playing around with wxRuby and XRC and I’m unable to create modal
WxDirDialog. After opening it I’m always able to get focus on parent
window.
class TestApp < Wx::App
def on_init
@test = Main.new.show
end
end
class Main < MainFrame
def initialize
super
self.size = ([133,191])
evt_button(basic_config) { | event | butt_event(event) }
end
end
def butt_eventos(event)
adr = Wx::DirDialog.new( @test, “Choose a folder”)
case adr.show_modal()
when Wx::ID_OK
puts “Directory: %s” %
[ adr.get_path ]
when Wx::ID_CANCEL
puts “NOT OK”
end
adr.destroy()
end
After changing DirDialog to FileDialog or MessageDialog it works great,
and those dialogs are modal, so it looks that in Dirdialog is buggy, bt
maybe I’m doing something wrong. Any ideas? Thnx.
(I’m using latest wxRuby,wx_sugar, tested on winXP and Vista)