On 5/20/10 10:20 PM, Martinecz Miklós wrote:
> From: [email protected] [mailto:[email protected]] On
> Behalf Of Paul McNett
> Sent: Thursday, May 20, 2010 11:18 PM
> To: Dabo Users list
> Subject: Re: [dabo-users]Open a new form within the application frame (not
> as new window)
>
> On 5/20/10 2:03 PM, Ed Leafe wrote:
>> On May 20, 2010, at 4:41 PM, Paul McNett wrote:
>>
>>> On 5/20/10 10:36 AM, Ed Leafe wrote:
>>>> On May 20, 2010, at 1:06 PM, Martinecz Miklós wrote:
>>>>
>>>>> This time I have no error message and the child opens but not in the
> place
>>>>> of the main form as I would expect. (I placed the 'dabo.MDI = True'
> just
>>>>> under the 'import Dabo' line in the main.py file.)
>>>>
>>>> It should open up as a "window within a window". In other words,
> your main form should be a big blank window, with your child forms
> completely enclosed within that main form.
>>>
>>> The main form needs to descend from dabo.ui.dFormMain, and not
> dabo.ui.dForm. Could
>>> this be the issue?
>>
>>
>> I doubt it, as I already specified that.
>
> You specified to have self.Application.MainForm as the parent. However,
> self.Application.MainForm doesn't necessarily descend from dFormMain, which
> is why I thought I'd mention it.
>
> Paul
>
> ****
>
> Hi,
>
> The confusion can arise due to my misunderstanding.
> I have two forms, say, firstForm and secondForm.
> Both are created in the CD.
>
> The firstForm is given as main form in the Main.py like this:
> app.MainFormClass = "firstFrom.cdxml".
The form defined by firstForm.cdxml needs to derive from dabo.ui.dFormMain, and
not
dabo.ui.dForm.
>
> I put the following code in the afterInitAll of the firstForm:
> frm=dabo.ui.createForm("c:\Projects\UTerv\ui\secondForm.cdxml",
> ...self.Application.MainForm)
> frm.show()
It would be equivalent to say:
frm = dabo.ui.createForm("c:\Projects\UTerv\ui\secondForm.cdxml", self)
Since self and self.Application.MainForm are, in this case, the same object.
Note that you shouldn't be using hard-coded absolute pathing, but let's not
discuss
that part right now, just be aware that you are going to want to change that
some
time in the future.
> Possible problem can be also, that the firstFrom is not empty but contains
> editboxes and controlls. May be I should create an empty 'frame' window and
> call my forms within that frame.
I think that someone has been successful creating controls on the MDI Parent,
but in
general I don't think it works very well. The MDI parent should be basically an
empty
frame with menu bar and status bar.
Paul
_______________________________________________
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]