Code Samples Demonstrate How to Use the Outline ControlID: Q136578 The information in this article applies to:
SUMMARYThis article provides code that demonstrates how to use the Outline control.
MORE INFORMATION
Code Sample OneIn this example, the user selects a database (.dbc file). Then all of its tables, fields, and indexes are listed hierarchically in the outline control. **** BEGINNING *** *: TEST PUBLIC frm1 frm1=CREA('Myform') frm1.SHOW FOR i=1 TO frm1.CONTROLCOUNT ENDFOR
*:************************************************************************* *: *: Class:myform BaseClass: FORM *: *:************************************************************************* DEFINE CLASS myform AS FORM ENDDEFINE
*:************************************************************************ *: *: Class:Cont1 BaseClass: CONTAINER *: *:************************************************************************* DEFINE CLASS Cont1 AS CONTAINER ENDDEFINE
*:************************************************************************* *: *: Class:OleCtrl BaseClass: OLECONTROL *: *:************************************************************************* DEFINE CLASS OleCtrl AS OLECONTROL ENDDEFINE
*:************************************************************************* *: *: Class:cmdbtn BaseClass: COMMANDBUTTON *: *:************************************************************************* DEFINE CLASS cmdbtn AS COMMANDBUTTON ENDDEFINE
**** END OF EXAMPLE 1 ***
Code Sample TwoThis example shows how to use the :: operator to call the Outline control's Init event. **** BEGINNING *** PUBLIC oForm oForm=CREATE('form') oForm.ADDOBJECT('oRedOutl','out1') oForm.oRedOutl.VISIBLE=.T. oForm.oRedOutl.CLICK oForm.SHOW *:************************************************************************* *: *: Class:out BaseClass: OLECONTROL *: *:************************************************************************* DEFINE CLASS out AS OLECONTROL ENDDEFINE
*:************************************************************************* *: *: Class:out1 BaseClass: out *: *:************************************************************************* DEFINE CLASS out1 AS out PROCEDURE INIT ENDDEFINE
**** END OF EXAMPLE 2 ***
For an example of a form (.scx file) that uses the Outline control, please see the Outline1.scx sample form located in the Vfp\Samples\Ole directory. Additional reference words: 3.00 VFoxWin KBCategory: kbprg kbcode KBSubcategory: FxinteropOle |
Last Reviewed: September 12, 1995 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |