Dr R.J.Appleton wrote: > Paul McNett wrote: >> Ed Leafe wrote: >>> On Jan 6, 2007, at 6:35 PM, Dr R.J.Appleton wrote: >>> >>>> I tried frm.ShowMenuBar=False, it gets rid of the menu bar OK. >>>> There is >>>> still a problem in that the DABO menus are shown in the form frame, >>>> which they should not be as this should be an MDI child form as I have >>>> an MDI app on Windows. >>>> >>>> Is there any way to get the form created from file to be an MDI child? >>> I don't work with MDI forms, so you'll have to explain the problem a >>> bit better. You say that changing the setting gets rid of the menu >>> bar, but that they are still shown? I'm not following. >> I don't understand either. When I make an appwizard app and run it on >> Windows, I get an MDI application where there's a main form and the >> child forms are contained within it. In addition, the child's menu gets >> merged in with the main form's menu and only displayed on the main form. >> >> It is a complete MDI application that works like MDI is supposed to, I >> think. >> > > The App Wizard does indeed generate a complete MDI application. That is > what I used to generate a stub application with data maintenance forms. > Now I want to use the class designer to add other, more complex, > forms. I want these forms to be shown in MDI child windows like the > others. > > Using: > frm = dabo.ui.createForm(filename) > frm.Parent = app.MainForm > frm.Show() > > to instantiate the form gives me one with all of the DABO menus, ie. it > is not an MDI form like the App Wizard ones. > > The attached pictures show this. > > It looks like createForm() does not check the global MDI flag set in > <application name>.py: > > if sys.platform[:3] == "win": > dabo.settings.MDI = True
Ok, thanks for clarifying. We now have enough to go on to test this and see what is going on. The way the global MDI flag works, when the class is instantiated it should definitely be MDI in all cases because the actual class definition is changed to inherit from a MDI child form instead of a non-MDI form. Please add this issue to the tracker (http://dabodev.com/tracker), which will let you add screenshots and comments (you can't send attachments to this mailing list unfortunately). Please ask Ed for a username/password if you don't have one already. Does the form exhibit at least some MDI behaviors such as maximizing into the MDI parent? It could be as simple as needing to send the Parent reference to the child's constructor instead of setting it after the child form has been constructed, which is currently impossible because dabo.ui.createForm() doesn't accept extra arguments. An MDI child with no parent wouldn't be able to merge its menu... -- pkm ~ http://paulmcnett.com _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
