Roger Lovelock wrote: > I think I may need to follow your suggestion - when I changed from dDialog > to dForm I got an error wuth the modal = true staement. After I removed that > the dialog just flashed up on the screen and disappeared before I could > click the button.
You can set Form.Modal=True, but it has to be done in the constructor. Example: frm = FrmReportMyReport(None, Modal=True) However, this method of form modality has some subtle problems and if you want modality, you should really use a dialog[1]. I recommend a dialog for the reporting stuff, as you are asking the user for some information and for them to perform an action. IOW, a dialog. Your form flashed by and disappeared because you either didn't have an application loop running or your code didn't hold on to the form reference. When you have a modeless form, you need to assign the reference somewhere else than the local scope where you declare the form. Example: self.frm = FrmReport(None) self.frm.show() # this code will execute right after the form is shown, # before the user interacts with it But now you need to have other code respond to form events. Much easier to instantiate a modal dialog like: dlg = DlgReport(None) dlg.showModal() # this code will execute only after the dialog is hidden. > Not sure what you mean by saving the attribute reference and then > referencing it. The dDialog has no such attribute ... *You* add the attribute, so *you* may reference it later. Python lets you do that. [1] In actuality, when you declare a form Modal, you *do* get a dialog, but this uses wizardry behind the scenes that has some subtle edge-case bugs. May as well just declare a dialog which has no such problems. _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/[email protected]
