Microsoft KB Archive/140849

= How To Make a PageFrame Work with the Wizard Txtbtns Class =

Article ID: 140849

Article Last Modified on 7/1/2004

-

APPLIES TO


 * Microsoft Visual FoxPro 8.0 Professional Edition
 * Microsoft Visual FoxPro 7.0 Professional Edition
 * Microsoft Visual FoxPro 6.0 Professional Edition
 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 3.0b Standard Edition
 * Microsoft Visual FoxPro 3.0 Standard Edition

-



This article was previously published under Q140849



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.



Step-by-step example
 Create a new form by using the Form Wizard or by creating a form of your own. Add the TxtBtns. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

139597 How to 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.</ol>

<div class="references_section">