IWxStyle.AdjustMode

Syntax

AdjustMode: WxAdjustMode;

AdjustMode: Prognoz.Platform.Interop.Andy.WxAdjustMode;

Description

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.

Example

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;
Imports Prognoz.Platform.Interop.Andy;
 
Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    wsp: IWxWorkspace;
    Shape: IWxShape;
    Style: IWxStyle;
Begin
    
// Get workspace for editing
    mb := Params.Metabase;
    wsp := mb.ItemById[
"IWSTYLE"].Edit() As IWxWorkspace;
    wsp.BeginUpdate();
    Shape := wsp.Shapes.Item[
0];
    Style := Shape.Style;
    Style.AdjustMode := WxAdjustMode.wamHeight;
    wsp.EndUpdate();
    (wsp 
As IMetabaseObject).Save();
End Sub;

After executing the example the height of the object frame is automatically fitted.

See also:

IWxStyle