PRB: Instance of Container Class Uses Parent Form Scalemode (130132)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 3.0
This article was previously published under Q130132 SYMPTOMS
Objects added to an instance of a Container Class by a program are placed
according to the Scalemode property of the parent form. Although a
Container Class has no Scalemode property, an instance inherits the
parent's Scalemode property from the form on which it is placed. This
occurs regardless of the Scale Units selected in the Class page of the
Class Info dialog.
RESOLUTION
Here are two techniques you can use to ensure that objects added to the
container are properly sized and placed:
- Reset the parent form Scalemode property to a value that allows proper
placement of objects. A Scalemode property can be added to the Container
Class and although it has no effect, the value of this property can be
read and the parent Scalemode set to the proper value. After the objects
are placed, the parent Scalemode can be reset to its original value.
- Determine the Scalemode of the parent form, and use the proper values to
place the objects for the current parent Scalemode.
Details for these techniques are presented in the "More Information"
section of this article.
STATUS
This behavior is by design.
Modification Type: | Major | Last Reviewed: | 2/9/2000 |
---|
Keywords: | kbcode KB130132 |
---|
|