PRB: "Expand is not an array" Error When Using Outline Control (139872)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 3.0
This article was previously published under Q139872 SYMPTOMS
The Outline control has an Expand property and an Expand event. According
to Visual FoxPro Help, you can expand an item of an Outline control
(Outline1) by using this code:
THISFORM.Outline1.Expand(<Item#>) = .T.
However, this code produces this error:
'Expand' is not an array
CAUSE
Visual FoxPro is interpreting Expand as a property of the Outline container
object. The syntax is similar to referencing Expand as an array. That is
why Visual FoxPro reports this error. You need to tell Visual FoxPro that
this is a property of the OLE control that the container is holding. The
Help documentation is incomplete.
RESOLUTION
The Object property provides access to the OLE server properties and
methods for an OLE object. Therefore, to expand an item, you can use this
code:
THISFORM.Outline1.Object.Expand(<Item#>) = .T.
This assumes that the <item#> of the Outline control contains subordinate
items and that it is currently collapsed.
STATUS
This behavior is by design.
Modification Type: | Major | Last Reviewed: | 2/10/2000 |
---|
Keywords: | KB139872 |
---|
|