MDI - not MDI

Byak@

Active Member
Licensed User
is it possible to make MDI form as normal form?
 

Byak@

Active Member
Licensed User
for example i have MDIParent form named mainex (mainex.IsMDIparent=true) and MDIChild form f1ex (mainex.makeMDIchild(f1ex.controlref)).
and now i want do f1ex not MDIchild.i have do f1ex as normal form.how?
i'm try mainex.IsMDIparent=false:f1ex.show
but have error (in russian)
 

agraham

Expert
Licensed User
Longtime User
Try

f1ex.IsMDIchild = false

EDIT:- Forget that, it's read only. As we have a bit of heatwave here I am using my EeePC laptop on the summerhouse veranda in the garden and it doesn't have all the reference and help installed :( I'll look later on my main machine.
 
Last edited:

Byak@

Active Member
Licensed User
Thanks Agraham,I'm wait =)
 

agraham

Expert
Licensed User
Longtime User
A FormEx is made into an MDI child form by assigning a reference to the MDI parent to it's MdiParent property which is what FormEx.MakeMDIchild does.

To make a FormEx that is an MDI child a normal form again you need to assign a null reference to its MdiParent property. Unfortunately this is not possible, even using the Door library because the Door library cannot handle null values :(.

I do have a hugely enhanced Door library for my own use that can do this but I don't want to post it without consulting Erel as I have stolen the Door library source and merged it with my DoorEx library to make a Door library on steroids :). However here is a teeny-weeny library, with source for merging, that can set any property to null as follows. ObjN1 is an ObjectNull.

B4X:
   ObjN1.New1
   ObjN1.Value = FormEx2.ControlRef
   ObjN1.SetPropertyNull("MdiParent")

I have tested on an MDI child FormEx in FormExDemo program and it seems to work OK transforming the MDI child back to a normal FormEx
 

Attachments

  • DoorNull1.0.zip
    2.2 KB · Views: 168
Last edited:

Byak@

Active Member
Licensed User
big-big-big thanks Andrew!you are a great man! (sorry, i don't know this word in english)
 
Top