<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Balloon Leaders? in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/balloon-leaders/m-p/447876#M12159</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I run the following code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
public void DrawText( IActiveView view, BalloonParms balloonParms ) {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; ITextElement textElement = new TextElementClass();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; textElement.Text = balloonParms.TextString;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; textElement.ScaleText = true;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; textElement.Symbol = GetTextBalloon( balloonParms );&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; IElement element = textElement as IElement;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; element.Geometry = balloonParms.AnchorPoint;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; view.GraphicsContainer.AddElement( element, 0 );&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; view.PartialRefresh( esriViewDrawPhase.esriViewGraphics, element, null ); 
}
 &lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(Ignore the details of GetTextBalloon() it is just a standard dance of formatted text, balloon callout, simple fill, and simple line. BalloonParms is just a struct with all the settings bundled.) I'm clicking on a polygon feature, getting the point location, and then calling this code. It works like a charm. But there is no leader line! &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What do you have to do with a Balloon Callout to get a Leader to extend from it?&amp;nbsp; When I use them with Labeling I can muck with the labeling parameters and somehow get Leaders to appear but with a TextElement I don't see how to do that?&amp;nbsp; Are Balloon Callout Leaders broken?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Dec 2011 13:22:41 GMT</pubDate>
    <dc:creator>GeorgeFaraj</dc:creator>
    <dc:date>2011-12-27T13:22:41Z</dc:date>
    <item>
      <title>Balloon Leaders?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/balloon-leaders/m-p/447876#M12159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I run the following code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
public void DrawText( IActiveView view, BalloonParms balloonParms ) {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; ITextElement textElement = new TextElementClass();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; textElement.Text = balloonParms.TextString;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; textElement.ScaleText = true;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; textElement.Symbol = GetTextBalloon( balloonParms );&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; IElement element = textElement as IElement;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; element.Geometry = balloonParms.AnchorPoint;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; view.GraphicsContainer.AddElement( element, 0 );&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; view.PartialRefresh( esriViewDrawPhase.esriViewGraphics, element, null ); 
}
 &lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(Ignore the details of GetTextBalloon() it is just a standard dance of formatted text, balloon callout, simple fill, and simple line. BalloonParms is just a struct with all the settings bundled.) I'm clicking on a polygon feature, getting the point location, and then calling this code. It works like a charm. But there is no leader line! &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What do you have to do with a Balloon Callout to get a Leader to extend from it?&amp;nbsp; When I use them with Labeling I can muck with the labeling parameters and somehow get Leaders to appear but with a TextElement I don't see how to do that?&amp;nbsp; Are Balloon Callout Leaders broken?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Dec 2011 13:22:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/balloon-leaders/m-p/447876#M12159</guid>
      <dc:creator>GeorgeFaraj</dc:creator>
      <dc:date>2011-12-27T13:22:41Z</dc:date>
    </item>
    <item>
      <title>Re: Balloon Leaders?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/balloon-leaders/m-p/447877#M12160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Charles,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Your line of code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;element.Geometry = balloonParms.AnchorPoint;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;sets the position of the balloon text (lower-left corner).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To set the leader line, you need to create another Point for the anchor of the leader line (offset from the text element of course) and assign it to IBalloonCallout.AnchorPoint.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you are already setting that in your GetTextBalloon() method, then you just need to use a point offset from it for IElement.Geometry.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;IOW, the leader won't show unless there is an offset between the two.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jan 2012 19:31:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/balloon-leaders/m-p/447877#M12160</guid>
      <dc:creator>JeffreyHamblin</dc:creator>
      <dc:date>2012-01-03T19:31:00Z</dc:date>
    </item>
  </channel>
</rss>

