On 7/17/07, Bill Witherspoon <[EMAIL PROTECTED]> wrote: > > On 7/16/07, Bill Witherspoon <[EMAIL PROTECTED]> wrote: > >>> Create the form as a dDialog. Show the form as a modal form. When > >>> the user clicks ok or cancel, the form is not destroyed, it merely > >>> hides itself. You are then free to call a method from the dialog > >>> class you created (call it getData or getValue or whatever) and that > >>> function will return your selected value. Then destroy the dialog and > >>> you are done. > >>> > >>> This is simple compared to 2 completely unrelated forms... > >>> > >> I didn't pursue the dDialog idea because I assumed that it was for > >> simple Yes/No scenarios. I have bizobjs, etc. in my search form. > >> > >> Can I add bizobjs to a dDialog? Or do you mean that there's a way to > >> instantiate my sub-form as a dialog? I did see that you can specify > >> "Modal", but I thought that was a non-starter with wxPython not > >> supporting modal forms. > >> > >> Or have I completely missed your point? :-) > > > > Dialogs can range from the simple builtin ones dabo has to retrieve an > > int or a string or display a message to some that are as massive and > > complex as main forms. In fact, when you set a dForm's property to be > > modal it actually instantiates a dDialog. Just make sure to pass the > > property in the constructor or it won't work. > > > > You can add bizobjs to a dDialog just like a normal form. Check out > > the dOkCancelDialog as it will automatically add the ok/cancel > > controls for you. > > > > I will make a note to include the construction of a complex dialog in > > the book example I am working on... > > > > Hey Nate, > > If I could pester you some more: I've changed my form to a > dOkCancelDialog, which works works in that it solves my problem of > getting information back to the other for upon acceptance. > > However, I can't seem to get the data bound control (a grid) to work on > the dDialog. It displays, but doesn't fill. This part did work when I > had it on a dForm. To translate to a dDialog I had to remove the > unsupported form methods like self.addBizobj(), self.requery(), etc. I > was hoping that I would be able to bind the grid directly to the data > control without the form methods by calling the bizobj's methods, but > that doesn't seem to be working. ie: > > def afterInitAll(self): > #self.requery() > self.Item_Master_Lookup.requery() > self.grdResults.refresh() > > What's the trick to getting the bizobj and grid to work together without > the form methods?
I would have Ed elaborate a little bit on what needs to be done manually to update the grid. Truth be told I haven't actually ever used dGrid (still hard to believe). I haven't had an app that needed it. Glad the dialog is working for you. > > Bill. > > [excessive quoting removed by server] _______________________________________________ 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/dabo-users/[EMAIL PROTECTED]
