Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CmdDelete not disabling on form
Message
From
09/03/2004 16:12:11
Steven Kleypas
Tarrant County College District
Texas, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Title:
CmdDelete not disabling on form
Miscellaneous
Thread ID:
00884567
Message ID:
00884567
Views:
36
On a CBizObjMaintenanceForm, if a view is not requeried when the form instantiates (this is desired behavior in this case) or, I suppose if no records are found after requery, the forms cmdDelete button will always show up Enabled. After lurking around, I found that the code in the buttons Refresh method was sabotaging all of my and the MM frameworks efforts to disable it.

To make it work, I changed it from:

This.Enabled = (ThisForm.lAllowDelete AND NOT This.lReadOnly AND ;
NOT ThisForm.lReadOnly)

To:
This.Enabled = (ThisForm.lAllowDelete AND NOT This.lReadOnly AND ;
NOT ThisForm.lReadOnly AND NOT ThisForm.oBizObj.lNoRecords)

Is this an acceptable workaround or is the button supposed to be enabled when the form instantiates?
Reply
Map
View

Click here to load this message in the networking platform