Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Modal Form Problem
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00097145
Message ID:
00097214
Views:
21
>I have a modal form calling a modal form. The only problem is that when I release the second modal form, the Exit button on the toolbar is enabled, even though the first modal form has not yet been released.
>

Interesting...I guess no one has tried this before (modal to modal) but you're right...the toolbar does get enabled.

This is because the code that disables the toolbar is in CBaseModalForm.Init() and is only executed when the form instantiates. I have moved the Toolbar disable code from CBaseModalForm.Init() to CBaseModalForm.Activate(). You can do this in your form to get around this situation until you receive the next version of the framework. Here's the change:

1. Cut the following lines from CBaseModalForm.Init():

IF TYPE('goapp.oToolbars') == 'O'
goApp.oToolbars.SetEnabled(.F.)
ENDIF

2. Paste the code into CBaseModalForm.Activate and add a DODEFAULT:

DODEFAULT()
IF TYPE('goapp.oToolbars') == 'O'
goApp.oToolbars.SetEnabled(.F.)
ENDIF


If you are also using CBizObjModalForm, you can make the same change in its Init() and Activate() methods.

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Reply
Map
View

Click here to load this message in the networking platform