IWxShape.BringToFront

Syntax

BringToFront;

BringToFront();

Description

The BringToFront method brings an object to front.

Example

Executing the example requires that repository contains a workspace with the WSP identifier containing several shapes.

Add links to the Andy, Metabase system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    ws: IWxWorkspace;
    Size: IGxSizeF;
    Shape: IWxShape;
Begin
    MB := MetabaseClass.Active;
    // Get workspace
    ws := MB.ItemById("WSP").Edit As IWxWorkspace;
    ws.BeginUpdate;
    Shape := ws.Shapes.Item(0);
    Shape.BringToFront;
    ws.EndUpdate;
    // Save changes
    (ws As IMetabaseObject).Save;
End Sub UserProc;
Imports Prognoz.Platform.Interop.Andy;
 
Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    ws: IWxWorkspace;
    Shape: IWxShape;
Begin
    MB := Params.Metabase;
    
// Get workspace
    ws := MB.ItemById["WSP"].Edit() As IWxWorkspace;
    ws.BeginUpdate();
    Shape := ws.Shapes.Item[
0];
    Shape.BringToFront();
    ws.EndUpdate();
    
// Save changes
    (ws As IMetabaseObject).Save();
End Sub;

After executing the example the selected object is brought to front.

See also:

IWxShape