Hi,
i am having a small problem. I have a modeless dialog in my app. It
pops up when I press a menu. Since it is a modeless dialog I can
interact with main app even when it is visible. So, when I press that
menu again a new dialog pops up and it keeps poping up again and
again. Is there any way to stop it when it is already visible?
When pressing that menu, if the dialog is not visible than it will
pop up and if it is already visible than the focus will set to it.
Thanks
Regards
Hi,
if I understand the described behaviour correctly, you might need to
keep a reference to the dialog (initialised to None before it is
created or after it is closed). Then then the menu action can either
create a new one or show the previously created one.
In the (likely) case I missed something, a code sample from your
program might help.
hth,
vbr
···
2011/3/7 BirdaoGwra <birdaogwra@gmail.com>:
Hi,
i am having a small problem. I have a modeless dialog in my app. It
pops up when I press a menu. Since it is a modeless dialog I can
interact with main app even when it is visible. So, when I press that
menu again a new dialog pops up and it keeps poping up again and
again. Is there any way to stop it when it is already visible?
When pressing that menu, if the dialog is not visible than it will
pop up and if it is already visible than the focus will set to it.
Thanks
Regards
--
Hi Vlastimil,
Thank you for the reply. A reference to None just do the trick.
Regards
···
On Mar 7, 4:36 am, Vlastimil Brom <vlastimil.b...@gmail.com> wrote:
2011/3/7 BirdaoGwra <birdaog...@gmail.com>:> Hi,
> i am having a small problem. I have a modeless dialog in my app. It
> pops up when I press a menu. Since it is a modeless dialog I can
> interact with main app even when it is visible. So, when I press that
> menu again a new dialog pops up and it keeps poping up again and
> again. Is there any way to stop it when it is already visible?
> When pressing that menu, if the dialog is not visible than it will
> pop up and if it is already visible than the focus will set to it.
> Thanks
> Regards
> --
Hi,
if I understand the described behaviour correctly, you might need to
keep a reference to the dialog (initialised to None before it is
created or after it is closed). Then then the menu action can either
create a new one or show the previously created one.
In the (likely) case I missed something, a code sample from your
program might help.
hth,
vbr