Dear friends,
I have an app with a modal dialog window . From this
modal window the user can open a "child" window ( via a context
menu ) , in order to
select some items. For making my users life easier , i decided to have
a setting in the
app , to open automaticaly the "child" window when the modal
dialog is shown. The problem is that when this setting is 'ON' ( and
the "child" window
opens up in the same time with the modal parent window ), the
"modality" of the
parent does not allow the user to make his choices , but when the user
uses
the context menu to open the "child" , the "modality" dissappears ,
and the choices
are made as planned. ! Why do i get different behaviours?
I will try to make a small running example , but if in the meantime
someone has a clue for me ,
i will be very happy to know...
Probably because you are creating the child before the ShowModal is called, so the modality excludes interaction with that child because it existed at the time of the ShowModal. You can probably work around this by creating a function that creates and shows the child, and using wx.CallAfter to call it after the ShowMOdal starts its nested event loop.
···
On 1/16/12 12:28 PM, Elias Alhanatis wrote:
Dear friends,
I have an app with a modal dialog window . From this
modal window the user can open a "child" window ( via a context
menu ) , in order to
select some items. For making my users life easier , i decided to have
a setting in the
app , to open automaticaly the "child" window when the modal
dialog is shown. The problem is that when this setting is 'ON' ( and
the "child" window
opens up in the same time with the modal parent window ), the
"modality" of the
parent does not allow the user to make his choices , but when the user
uses
the context menu to open the "child" , the "modality" dissappears ,
and the choices
are made as planned. ! Why do i get different behaviours?
Thank you for your reply , i have tried what you mention
before i wrote my note , but i was using the wrong way the
arguments which must by supplied with CallAfter. After your
response , i was 100% sure that CallAfter was the correct way
to go , and i finally got it to work!
Thank you so much , for onemore time , for helping!!!