This is a migrated thread and some comments may be shown as answers.

MDI Mode Activate DocumentPane

1 Answer 87 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Adam
Top achievements
Rank 2
Adam asked on 30 Sep 2008, 03:40 PM
I'm trying to set  up a parent form with a menu along the top, and a tabbed MDI interface on the bottom.  Selecting items from the menu will create a new form if the form doesn't already exist, or select the existing form if it does.

I am running into problems on selecting/activating the existing form.  I have tried activating the form object itself, I have tried finding the documentpane parent of the form and activating that. 

Activating the documentpane selects the appropriate tab, but instead of showing the forms contents, it show a dark grey background.  What am I missing?

Thanks!

1 Answer, 1 is accepted

Sort by
0
Adam
Top achievements
Rank 2
answered on 30 Sep 2008, 04:19 PM
I found the problem, it looks like in the case of trying to activate an existing form, I was setting the form's MDI Parent again and this was somehow causing the form not to show up.

The following psuedo-code is close to what I used.

if (not form exists)
{
        new form()
        form.mdiparent = parent
        form.show()
}
else
{
        documentpane.activate()
}


Thanks.
Tags
Dock
Asked by
Adam
Top achievements
Rank 2
Answers by
Adam
Top achievements
Rank 2
Share this question
or