AdjustMode: WxAdjustMode;
The AdjustMode property determines size fitting mode for a shape frame based on the text that is inside the shape.
Fitting is not executed by default.
Executing the example requires that the repository contains a workspace with the IWSTYLE identifier that contains a shape.
Add links to the Andy and Metabase system assemblies.
Sub UserProc;
Var
Mb: IMetabase;
Wsp: IWxWorkspace;
Shape: IWxShape;
Style: IWxStyle;
Begin
// Get workspace for editing
Mb := MetabaseClass.Active;
Wsp := Mb.ItemById("IWSTYLE").Edit As IWxWorkspace;
Wsp.BeginUpdate;
Shape := Wsp.Shapes.Item(0);
Style := Shape.Style;
Style.AdjustMode := WxAdjustMode.Height;
Wsp.EndUpdate;
(Wsp As IMetabaseObject).Save;
End Sub UserProc;
After executing the example the height of the object frame is automatically fitted.
See also: