Ed Leafe wrote:
> On Apr 23, 2007, at 2:01 PM, Dave Nation wrote:
>
>   
>>>     You need to pass a reference to the parent form to the createForm()
>>> method. So that line should read:
>>>
>>> frm = dabo.ui.createForm(frmclass, parentForm)
>>>
>>>       
>> I tried this with the following code in the main form menu event
>> handler, but the form is still not loaded as an MDI child.
>>
>> def openRecipes(evt):
>>     mainForm = evt.Application.MainForm
>>     print "mainForm.MDI",mainForm.MDI      # This Prints True
>>     mainForm.Caption = "New Title'"        # Changes caption on main
>> form showing mainForm if a good Reference
>>
>>     frm = dabo.ui.createForm("recipes.cdxml",mainForm)
>>     if frm:
>>         frm.show()
>>
>> When I open a Command window from the same menu, it opens as an MDI  
>> child.
>>
>> Any advice would be much appreciated
>>     
>
>       I might have been too hasty with my suggestion. Looking over at the  
> createForm() code, try this instead:
>
> frm = dabo.ui.createForm(frmclass, parent=parentForm)
>
> There is an optional 'show' parameter that I forgot about.
>
>   
That did the trick, the form now loads as an MDI child.
I then uncovered the next problem, that the default menu for the form 
was replacing main form menu.
Looking at the code for dForm, I uncovered the Keyword argument 
MenuBarClass, and setting that to None in the createForm sorted that 
problem.

I hope this means I'm starting to get hang of how things work in Dabo.

Thanks again for the excellent support

Dave



_______________________________________________
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]

Reply via email to