This document is archived and information here might be outdated.  Recommended version.


IGraphicProperties.Callout Property (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Controls > ESRI ArcGIS Controls > Interfaces > IG > IGraphicProperties Interface > IGraphicProperties.Callout Property
ArcGIS Developer Help

IGraphicProperties.Callout Property

The callout symbol used by the CommandsEnvironment singleton.

[Visual Basic .NET]
Public Property Callout As IFormattedTextSymbol
[C#]
public IFormattedTextSymbol Callout {get; set;}
[C++]
HRESULT get_Callout(
  IFormattedTextSymbol* ppCallout
);
[C++]
HRESULT put_Callout(
  IFormattedTextSymbol** ppCallout
);
[C++]
Parameters
ppCallout [in]

ppCallout is a parameter of type IFormattedTextSymbol* ppCallout [out, retval]
ppCallout is a parameter of type IFormattedTextSymbol**

Product Availability

Available with ArcGIS Engine.

Description

The Callout used by the IHookActions methods. By default the Callout is black, and size 10 using the 'Arial' font. 

[C#]

using System;
using System.Windows.Forms;
using ESRI.ArcGIS.esriSystem;
using ESRI.ArcGIS.Controls;
using ESRI.ArcGIS.Display;

namespace TestApp
{
    public sealed partial class MainForm : Form
    {
        private CommandsEnvironmentClass m_CommandsEnvironment = new CommandsEnvironmentClass();
        
        private void MainForm_Load(object sender, EventArgs e)
        {
            //Set buddy control
            axToolbarControl1.SetBuddyControl(axMapControl1);

            //Set the default callout to be a solid, red, rectangle
                                                                                                                                        
            IRgbColor color = new RgbColorClass();
            color.Red = 255;

            IFillSymbol fillSym = new SimpleFillSymbolClass();
            fillSym.Color = color;
           
            IBalloonCallout ballonCallout = new BalloonCalloutClass();
            ballonCallout.Style = esriBalloonCalloutStyle.esriBCSRoundedRectangle;
            ballonCallout.Symbol = fillSym;
            IFormattedTextSymbol formattedTextSym = new TextSymbolClass();
            formattedTextSym.Background = ballonCallout as ITextBackground;

            IGraphicProperties graphicProps = m_CommandsEnvironment as IGraphicProperties;
            graphicProps.Callout = formattedTextSym;
        }
    }
}

 

[Visual Basic .NET]

Imports ESRI.ArcGIS.esriSystem
Imports ESRI.ArcGIS.Controls
Imports ESRI.ArcGIS.Display

Public Class MainForm
  
    Private m_CommandsEnvironment As CommandsEnvironment = New CommandsEnvironment()

    Private Sub MainForm_Load(ByVal sender As System.Object, ByVal e As EventArgs) Handles MyBase.Load
       
        'Set buddy control
        axToolbarControl1.SetBuddyControl(axMapControl1)

        'Set the default callout to be a solid, red, rectangle 
        Dim color As IRgbColor = New RgbColorClass
        color.Red = 255

        Dim fillSym As IFillSymbol = New SimpleFillSymbolClass
        fillSym.Color = color

        Dim ballonCallout As IBalloonCallout = New BalloonCalloutClass
        ballonCallout.Style = esriBalloonCalloutStyle.esriBCSRoundedRectangle
        ballonCallout.Symbol = fillSym
        Dim formattedTextSym As IFormattedTextSymbol = New TextSymbolClass
        formattedTextSym.Background = CType(ballonCallout, ITextBackground)
        Dim graphicProps As IGraphicProperties = CType(m_CommandsEnvironment, IGraphicProperties)
        graphicProps.Callout = formattedTextSym

    End Sub

End Class

See Also

IGraphicProperties Interface