Wx::FileDialog and common dialogs

The documentation for Wx::FileDialog is incorrectly generated:
http://wxruby.rubyforge.org/doc/filedialog.html
Every time the ‘*’ (for the wildcard character in file filters) appears,
the doc instead switches between boldface and normal.

Also, it seems like the links under “See also” 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 W.

Jari W. wrote:

The documentation for Wx::FileDialog is incorrectly generated:
http://wxruby.rubyforge.org/doc/filedialog.html
Every time the ‘*’ (for the wildcard character in file filters) appears,
the doc instead switches between boldface and normal.

Thanks for the report; we’ll tidy it up for the next release.

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

For all Windows, which includes Dialogs, the style normally has to be
set in the initializer - this is a WxWidgets restriction we can’t really
work around. There is a method

d.window_style = Wx::WHAT_EVER
http://wxruby.rubyforge.org/doc/window.html#Window_setwindowstyle

  • but the catch is that some styles cannot be altered after
    initialization.

If you’re looking for a more self-documenting style of code, you could
use keyword arguments to the constructor:

dlg = Wx::FileDialog.new(parent, :style => Wx::WHAT_EVER)

hth
alex