Doing that has the same effect; when I re-launch the same dialog, I get the same one, not a new one. EndModal() takes an argument that is supposed to be what to return in ShowModal, so maybe that is where I am going wrong (I do not quite understand the docs on that one). Well, it is a small enough dialog that manually clearing controls is not a big deal, I just thought I would use a cleaner way if one existed. On 6/18/11, Jamal Mazrui <empower@xxxxxxxxx> wrote: > Try the EndModel method on the dialog and then ShowModel to return it. > You might also need to hide the window -- I forget the method name for that. > > Jamal > > > On 6/17/2011 9:39 PM, Alex Hall wrote: >> Well, now it turns out I do have a question about this after all. >> Again, I am basing my application on a PYLbc Dialog object, and a >> couple buttons will pop up different dialogs on top of the main one. >> When these children (if that is the right word) are closed, I call >> Destroy() on them. This works the first time, but if I launch a child, >> close it, and try to launch it again, I get a DeadObject error which >> says that the c++ part of the Dialog object has gone away. >> >> A rather inelegant solution I have put in place for now is to call >> SetFocus() on the control I want to be focused on when the child >> launches, clear any text fields, and then call Show(False) on the >> child dialog object. This works, but is there a better way, something >> that will get rid of the dialog but still let me launch another >> instance of it if I want to? I hope this makes sense. >> >> On 6/17/11, Alex Hall<mehgcap@xxxxxxxxx> wrote: >>> Please disregard my previous post; it was a coding error on my part >>> (the if statement was looking for the wrong button name). Sorry about >>> that. >>> >>> On 6/17/11, Alex Hall<mehgcap@xxxxxxxxx> wrote: >>>> Hi all, >>>> Yet another question with lbc, though this should be a bit more >>>> generalized. I have a dialog with a custom event handler. Some buttons >>>> in the dialog should spawn new dialogs, such as a search button >>>> launching a new dialog for entering the search terms. Currently, I >>>> call Complete() on the dialog I want to pop up, but nothing at all >>>> happens. It is probably some call I am missing, not being familiar >>>> with handling gui applications at all and especially not with multiple >>>> dialogs. Do I need to destroy the existing dialog, or something like >>>> that? I would rather the existing dialog still be there when the user >>>> closes the newly created dialog if possible. I have even tried setting >>>> the new dialog's parent to the existing dialog. Any suggestions? >>>> Thanks. >>>> >>>> -- >>>> Have a great day, >>>> Alex (msg sent from GMail website) >>>> mehgcap@xxxxxxxxx; http://www.facebook.com/mehgcap >>>> >>> >>> >>> -- >>> Have a great day, >>> Alex (msg sent from GMail website) >>> mehgcap@xxxxxxxxx; http://www.facebook.com/mehgcap >>> >> >> > -- Have a great day, Alex (msg sent from GMail website) mehgcap@xxxxxxxxx; http://www.facebook.com/mehgcap __________ View the list's information and change your settings at //www.freelists.org/list/programmingblind