HOWTO: Make a PageFrame Work with the Wizard Txtbtns Class
ID: Q140849
|
The information in this article applies to:
-
Microsoft Visual FoxPro for Windows, versions 3.0, 3.0b, 5.0, 6.0
SUMMARY
This article shows by example how to make the Wizard TxtBtns class from the
WizStyle.vcx library work on a form that also holds a PageFrame. By
default, TxtBtn and PageFrame classes do not function properly together.
This article shows you how to overcome this limitation.
MORE INFORMATIONStep-by-Step Example
- Create a new form by using the Form Wizard or by creating a form of your
own. Add the TxtBtns. For more information, please see the following
article in the Microsoft Knowledge Base:
Q139597
HOWTO: Use the Wizard txtbtns Class in a Non-Wizard Form
Be sure to set the form's Buffermode property to 1 or 2 and set the
Enabled property of each control on the form to False (.F.).
- Add a PageFrame to the form, and add some text boxes to the pages.
- Set the Enabled property for each text box in the PageFrame to False
(.F.).
- In the Click event of the cmdAdd button, add this code:
* Note: Repeat the second line for each page in the PageFrame
* substituting the appropriate name for each page
txtbtns.cmdAdd::click()
thisform.pageframe1.page1.setall("enabled",this.parent.editmode)
thisform.pageframe1.setall("enabled",.t.,"label")
- In the Click event of the cmdEdit button, add this code:
* Note: Repeat the second line for each page in the PageFrame
* substituting the appropriate name for each page
txtbtns.cmdEdit::click()
thisform.pageframe1.page1.setall("enabled",this.parent.editmode)
thisform.pageframe1.setall("enabled",.t.,"label")
- Save and run the form.
REFERENCES
For more information about using Wizard TxtBtns in forms in Visual FoxPro
for Windows, please see the following articles in the Microsoft Knowledge
base:
Q134704
HOWTO: Add Controls to a Screen Generated by the
Screen Wizard
Q134790
HOWTO: Add Code to Wizard-Generated Command Buttons
Q139597
HOWTO: Use the Wizard TxtBtns Class in a Non-Wizard Form
Additional query words:
Keywords : kbcode kbnokeyword kbVFp300 kbVFp500 kbVFp600
Version : WINDOWS:3.0,3.0b,5.0,6.0
Platform : WINDOWS
Issue type : kbhowto
|