Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Modal forms launched by dockable forms
Message
 
 
To
01/01/2021 07:47:33
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01677685
Message ID:
01677688
Views:
64
Antonio,

I copied your code into a test.prg and then executed it. All I see is one form with tabs. Please see the attached image. Is this how it is suppose to work?

UPDATE. Now I see what you mean. When I click on a button another form is opened. And it is true that at one point the modal form is behind and you can't get to it.


>Dear All,
>
>I'm checking on the possibility of using dockable forms in an MDI application, but I'm facing a problem while mixing dockable and non-dockable forms in the same screen. The problem gets more acute if there are modal forms involved, although it shows up with non dockable modeless forms, as well.
>
>When there are dockable forms open, non-dockable forms are always shown behind. If a new form is a modal form, it means that the user will not be granted access to the modal dialog if there is no sufficient screen space to display the new form. At the same time, the dockable form remains disabled until the the modal form is closed.
>
>The following snippet demonstrates the issue, and the attached picture shows how the various launched forms are arranged. Is there any workaround? Or am I missing something, obvious or obscure?
>
>If you're willing to try the snippet, please save any current work in your IDE: you may have not sufficient screen space to close VFP9 properly if the modal form is left completely hidden under the docked forms.
>
>
>LOCAL DF1 AS dockableForm
>LOCAL DF2 AS dockableForm
>LOCAL DF3 AS dockableForm
>
>m.DF1 = CREATEOBJECT("dockableForm", "modalForm")
>m.DF2 = CREATEOBJECT("dockableForm", "nonModalForm")
>m.DF3 = CREATEOBJECT("dockableForm", "nonModalDockableForm")
>
>m.DF1.Dock(3)
>m.DF2.Dock(4, m.DF1)
>m.DF3.Dock(4, m.DF1)
>
>READ EVENTS
>
>DEFINE CLASS modalForm AS Form
>
>	WindowType = 1
>	AlwaysOnTop = .T.
>	AutoCenter = .T.
>
>	ADD OBJECT tb AS TextBox
>
>ENDDEFINE
>
>DEFINE CLASS nonModalForm AS Form
>
>	WindowType = 0
>
>	ADD OBJECT tb AS TextBox
>
>ENDDEFINE
>
>DEFINE CLASS nonModalDockableForm AS Form
>
>	WindowType = 0
>	Dockable = 1
>
>	ADD OBJECT tb AS TextBox
>
>ENDDEFINE
>
>DEFINE CLASS dockableForm AS Form
>
>	Dockable = 1
>	typeOfSubform = "modalForm"
>	SubForm = .NULL.
>
>	ADD OBJECT cb AS CommandButton WITH AutoSize = .T.
>
>	PROCEDURE Init (typeSF AS String)
>
>		This.typeOfSubform = EVL(m.typeSF, "modalForm")
>		This.Caption = This.Caption + " " + This.typeOfSubform
>		This.cb.Caption = This.typeOfSubform
>
>	ENDPROC
>
>	PROCEDURE cb.click
>
>		Thisform.SubForm = CREATEOBJECT(Thisform.typeOfSubform)
>		Thisform.SubForm.Show()
>
>	ENDPROC
>
>	PROCEDURE Destroy
>		CLEAR EVENTS
>	ENDPROC
>
>ENDDEFINE
>
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform