The ChangeScale method is dependent on the BorderStyle property of forms. When BorderStyle is Single, you cannot resize the form manually, and ChangeScale adjusts form size as would be expected. However, if a form's BorderStyle is Sizeable, ChangeScale unexpectedly fails, as if expecting the user to take care of sizing.
ChangeScale is sensitive to columns in a DBGrid that have been sized by the developer. ChangeScale typically fails on such columns. This can result in a DBGrid component and Form being adjusted by ChangeScale, but the Columns in the DBGrid not being resized.
When implementing either of these methods, it is relatively easy to perform the logical conversions from the built-in variant types. You must consider, however, the possibility that the variant to or from which you are casting may be another custom Variant type. To handle this situation, you can try casting to one of the built-in Variant types as an intermediate step.
You cannot remove the column sizing through the IDE. In Form Text mode, you need to remove the Width statement on the column definition.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|