On Thu, 04 Jul 2013, Bruce wrote:
> Hi folks,
> 
> I have a form ("FSummary") that basically opens a variable number of
> other forms. This action is controlled by the user.
> 
> Each other form is an instance of a single form/class, say "FDetail".
> Each and any of these could be closed by the user at any time.  Also,
> when the FSummary form is closed, any remaining FDetail forms need to be
> automatically closed.
> 
> I have tried a few times to achieve this using arrays of Forms and
> arrays of window handles etc. but I am not really happy with the
> results.
> 
> How have others approached this issue?
> 
> tia
> Bruce
> 

Hmm. Normally there is something in the gb component to help you with
introspection problems like this. But this time I haven't found any.

I implemented this array method in a sample project and it seems to behave
quite well. I use an Observer to silently duplicate the events from the
children forms and manipulate an array in the parent form accordingly.

Even if not a new idea, I hope it helps.

Regards,
Tobi

Attachment: autoclose_children-0.0.1.tar.gz
Description: Binary data

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Gambas-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to