How to Expand or Collapse an Outline Control ProgrammaticallyID: Q136270 The information in this article applies to:
SUMMARYThis article illustrates how to expand or collapse the Outline control in an OLE Container control programmatically.
MORE INFORMATIONUse the Object property along with the Expand method to expand or collapse an OutLine control. Here is the syntax:
The Object property provides access to the OLE Server properties and
methods for an OLE object, which in this case, is the Outline control. The
numeric value enclosed in the parentheses that follow Expand is the Index
number of the item that you want to expand.
Step-by-Step Example of Expanding and/or Collapsing an Outline Control1. Create a new form. 2. Click OLE Container Control on the Form Controls toolbar, and then 3. On the Insert Object dialog box, click Insert Control. Select Outline
4. Insert the following code in the OleControl1 Init event procedure:
5. Add two command buttons (Command1 and Command2) to the form and set
6. Place the following code in the Command1 Click event procedure:
7. Place the following code in the Click event of Command2:
Additional reference words: 3.00 VFoxWin
KBCategory: kbtool kbcode
KBSubcategory: FxtoolFormdes
|
Last Reviewed: September 8, 1995 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |