ArcObjects Library Reference  (Display)    

IBalloonCallout Interface

Provides access to members that control the balloon callout.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

BalloonCallouts are a filled background that is placed behind text. Use the Style property to select from three different shapes for the balloon. Use the Symbol property to specify the fill symbol used as the background. Use the ICallout and the ITextMargins interfaces to set additional properties for IBalloonCallouts.

Members

Description
Read/write property AnchorPoint The anchor point.
Read/write property LeaderTolerance The closest distance to the text the anchor point can be for the callout to draw.
Read/write property Style The balloon callout style.
Read/write property Symbol The fill symbol.

Inherited Interfaces

Interfaces Description
ICallout Provides access to members that control the callout.

CoClasses that implement IBalloonCallout

CoClasses and Classes Description
BalloonCallout A filled background that is placed behind text.
[Visual Basic 6.0]

The following function shows how to update properties of a balloon callout.  You must pass in a reference to a TextSymbol.

 

Private Function Update(ByVal pFormattedTextSymbol As IFormattedTextSymbol) As ITextSymbol
Dim pTextBackground As ITextBackground
Set pTextBackground = pFormattedTextSymbol.Background

If pTextBackground Is Nothing Then
    'then there is not a text symbol background
    Set Update = pFormattedTextSymbol
    Exit Function
End If

If TypeOf pTextBackground Is IBalloonCallout Then
    Dim pBalloonCallout As IBalloonCallout
    Set pBalloonCallout = pTextBackground
    pBalloonCallout.Style = esriBCSRoundedRectangle
   
    Dim pFillSymbol As IFillSymbol
    Set pFillSymbol = New SimpleFillSymbol
    pFillSymbol.Color.RGB = 41156607  'a nice yellow color
   
    Set pBalloonCallout.Symbol = pFillSymbol
   
    Set pFormattedTextSymbol.Background = pBalloonCallout
    Set Update = pFormattedTextSymbol

Else 'backgroud is not a balloon callout
    Set Update = pFormattedTextSymbol
End If

End Function

See Also

ISimpleLineCallout Interface | ILineCallout Interface | ICallout Interface | IBalloonCallout Interface

Example

esriDisplay IBalloonCallout Example

 


Feedback Send feedback on this page