HOWTO: Use Usercontrolmode with Wizstyle Button Classes in VFP
Article ID: 163249
Article Last Modified on 7/13/2004
APPLIES TO
- Microsoft Visual FoxPro 5.0 Standard Edition
- Microsoft Visual FoxPro 6.0 Professional Edition
This article was previously published under Q163249
SUMMARY
The txtbtns and pictbtns classes contained in the Wizstyle.vcx library of
Microsoft Visual FoxPro for Windows version 5.0 have a new custom property
that controls the enabled/disabled property of a ComboBox, ListBox, or
Spinner control placed on the same form.
The Form wizard automatically drops a txtbtns object named "BUTTONSET1" on
any form it builds. All TextBox controls populated from fields in tables
are disabled until the Edit button of the BUTTONSET1 collection is clicked.
Clicking Save or Revert again disables those controls.
In Visual FoxPro 3.0 and 3.0b the developer had to add code to the click
methods of those buttons to control the enabled/disabled status of an
additional ComboBox, ListBox, or Spinner control in order to control
whether event methods of those would be allowed to modify values elsewhere
in a table or property.
When set to .F. the new "Usercontrolmode" property of the txtbtns and
pictbtns classes let the affected controls (ComboBox, ListBox, or Spinner)
work the same as they did in Visual FoxPro 3.0.
When Usercontrolmode is set to .T. the "Edit," "Save," and "Revert" buttons
enable and disable those controls the same way they enable/disable the
TextBox controls on that form.
Keywords: kbhowto kboop kbdesigner KB163249