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 repository contains a workspace with the IWSTYLE identifier containing shape.
Add links to the Andy, 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: