class Container
A container for other controls.
Syntax
[<oRef> =] new Container(<container> [,<name expC>])
<oRef>
A variable or property—typically of <container>—in which to store a reference to the newly created Container object.
<container>
The container—typically a Form object—to which you’re binding the Container object.
<name expC>
An optional name for the Container object. If not specified, the Container class will auto-generate a name for the object.
Properties
The following table lists the properties of interest in the Container class. (No particular methods are associated with this class.)
Property |
Default |
Description |
false |
Whether dragged objects can be dropped in the Container | |
0 – None |
How the Container object is anchored in its container (0=None, 1=Bottom, 2=Top, 3=Left, 4=Right, 5=Center, 6=Container) | |
CONTAINER |
Identifies the object as an instance of the Container class | |
(CONTAINER) |
Identifies the object as an instance of a custom class. When no custom class exists, defaults to baseClassName | |
BtnFace |
The background color | |
true |
Reports only: whether the container expands to show all its components | |
false |
Whether the container has the same background color or image as the its own container (usually the form)
| |
Event |
Parameters |
Description |
<left expN> |
When the mouse enters the Container's display area during a Drag&Drop operation | |
|
When the mouse leaves the Container's display area without having dropped an object | |
<left expN> |
While the mouse drags an object over the Container's display area during a Drag&Drop operation | |
|
|
|
<left expN> |
When the mouse button is released over the Container's display area during a Drag&Drop operation |
The following table lists the common properties, events, and methods of the Container class:
Description
Use the Container object to create groups of controls, a custom control that contains multiple controls, or to otherwise group controls in a form. When a control is dropped in a Container object, it becomes a child object of the Container object. Its parent property references the container, while its form property references the form.
To make the rectangle that contains the controls invisible, set the borderStyle property to None (3) and the transparent property to true.
When the Container's enabled property is set to "false", the enabled properties of all contained controls are likewise set to "false". When the Container's enabled property is set to "true", the enabled properties of the contained controls regain their individual settings.