How to Use the SETALL() Method in Visual FoxProID: Q128768 3.00 WINDOWS The information in this article applies to:
SUMMARYSETALL() is a new method provided with Visual FoxPro version 3.0. You can use it to set the properties (one at a time) for all of the instances of a certain class of controls within a container. This article shows by example how to use SETALL().
MORE INFORMATIONThe syntax for the method is:
Here cProperty is the property to be set, value specifies the new setting
for the property, and cClass specifies the class name of the class on which
the object is based (not the Visual FoxPro base class for the object).
General Instructions for IllustrationUsing the visual interface of Visual FoxPro, start a new form named fTest. Populate it with a grid with two columns, three text boxes, and a command button group with five buttons. In the Click method of one of the command buttons, insert the commands to change properties of each of the classes using the SETALL() method.
Step-by-Step Instructions to Demonstrate the Use of SETALL()1. Start the form definition by choosing New from the File menu. Then 2. Look for the window titled Form Designer - FormDocn (where n is the
3. Click the Button Lock tool on the Form Controls Toolbar. Then Click the
4. Click the Button Lock tool again to unlock the Form Controls Toolbar.
5. Click the Grid tool on the Form Controls Toolbar, and place a grid on 6. Click the grid to select it. It will have small handles on each corner
7. In the resulting "Properties - FormDocn" window, click the ColumnCount
8. With the mouse pointer, sieze the middle handle on the right side of the
9. Click the Command Group tool. Then place a command button group on the
10. Change the ButtonCount property to 5, and press ENTER.
11. Using the mouse pointer, resize the command group by pulling its bottom 12. Right-click the command group, and select Edit from the pop-up. Click
13. Notice that Command1 appears as the Object in the Properties window.
14. Using the mouse, select the bottom button. Change its caption to
15. Double-click the bottom button. This should cause an edit window with
16. Double-click the top button. In the "Command1.Click" edit window, enter
17. Run the form by clicking the Exclamation Point symbol on the top
18. Click the Change button. Observe the changed properties.
19. Click the Quit button. The class of objects that can be affected by the SETALL() method is listed in the Visual FoxPro Help text for the word SETALL. Additional reference words: 3.00 VFoxWin visual property method object class KBCategory: KBSubcategory: FxtoolFormdes
|
Last Reviewed: May 22, 1998 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |