Dialog advice needed
Vadim Zeitlin
vadim at wxwindows.org
Tue May 1 15:40:12 PDT 2007
On Tue, 01 May 2007 19:54:11 +0200 Fulvio Senore <mailing at fsoft.it> wrote:
FS> I would like to create a hidden dialog at startup, to show it in a modal
FS> way when the user chooses a menu, and to hide it when the user presses
FS> the OK button. In this way the user will always find the dialog as he
FS> left it the previous time.
This probably could be made to work too but why not just save the state of
the tree control and restore it when you recreate the dialog? This is a
more usual way of doing what you want and it's guaranteed to work.
FS> ShowModal() should return wxID_OK if the user chooses an item and clicks OK.
FS> This code works with Windows, but it does now work with Linux. In my
FS> Ubuntu 6.06 copy ShowModal() always returns wxID_CANCEL. I am using
FS> wxWidgets 2.8.3.
It's surprising that it works under Windows as I'm pretty sure you can't
just hide the modal dialog, you need to call EndModal().
Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
More information about the wx-users
mailing list