On Fri, Oct 3, 2008 at 5:08 PM, Ed Leafe <[EMAIL PROTECTED]> wrote:
>
>
>
> It's certainly possible to do what you ask, but not as simple as
> with
> a regular form, with its built-in data awareness. What do you need to
> do exactly? Perhaps we could come up with an alternative approach that
> would be easier to implement.
>
Well, my main app has a few fields that I was hoping to be able to fill by
opening a child form (acting like a dialog) which would present the options
for that field in a more consice way. I actually have the forms already set
up to transmit the data between forms, except that, of course, the parent
doesn't wait for the child to close before attempting to retrieve the
selected info.
Writing the above gave me an idea for a workaround that actually worked. I
don't know how Pythonic it is, but it works. Instead of depending on the
parent form to wait for the child to close before processing what the user
did in it, just before the form is closed I call a method in the parent form
with the selected value passed as a parameter, then the child form closes
itself. Here's the code for my "OK" button:
def onHit(self, evt):
self.Form.Parent.setSelectedItem(self.Form.CategoryText.Value)
self.Form.close()
Where setSelectedItem then sets the target text box's value in the parent
form to the selected value in the child form. I hope that made sense... I
never know how much detail is sufficient. But now the only thing I'm really
missing is having the parent form not select-able while the child is
visible.
Any thoughts or style corrections on my approach?
Thanks for your help,
Mike M.
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
_______________________________________________
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]