Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Exiting formset prematurely
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00066536
Message ID:
00067129
Views:
24
>I've got a form set with form1 and form2 within it.
>
>By default .visible of form2 is .F. so that I automatically only see form1 when I go into the formset.
>
>On form1 I have a button which does "Thisformset.form2.visible = .T."
>
>Then I can see form2 on top of form1 and do what I want to do to it...
>
>Two wierd things are happening:
>1) .windowtype is MODAL on form1 AND form2, .alwaysontop is even set to .T. on form2. So how come I can
> click into fields on form1!!! (Form1 doesn't come forward, but I can put my cursor in a form1 field!!)
> That should happen, should it? I don't want it to!
>
>2) I have a button on form2 I use when I'm done with it. It sets thisformset.form2.visible=.F., just like the manual say and yet, the WHOEL FORMSET disappears! (form1 and form2)
>What's up?
>
>How can I smoothly transition back and forth between forms in a formset, while making sure they're mutually exclusive (Ie: MODAL)
>
>Thanx a bunch!


Even though form2 is modal, both forms are objects within the formset container, so it is feasible that you could click into an object located on form1.

I ran into a similar situation recently and (as you have already done) set the AlwaysOnTop property of form2 to .T. The forms I was using each had a command button on it (Form1's button set the visible property of form2 to .T. and form2's button reversed the visible property back to .F.) However, both of my forms in the formset were centered, so when form2 was visible, only a small amount of the edges of form1 were visible (no objects on form1 were available for the user to "click" into.) Other than that, I never did find a way to make it act the way I wanted. However, without an object on form1 available while form2 is visible, there isn't a way to click into them until form2 is not visible, which was ultimately the desired effect. If you can center form2 over form1 and make it large enough to cover any objects on form1, it should take care of the situation, however "ugly" a fix it may seem!

HTH,

Patric
Previous
Reply
Map
View

Click here to load this message in the networking platform