Dialog advice needed

Fulvio Senore mailing at fsoft.it
Wed May 2 04:05:57 PDT 2007


I am writing a new message because I am not receiving e-mails from this 
list any more, so I cannot answer to a previous one.

> 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.

Just to save me some work, and to let the user see exactly the same dialog as before.
I think that showing the same item in a new dialog is likely to cause a slightly different layout.

> 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().

Anyway, it works.

Fulvio Senore




More information about the wx-users mailing list