<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Documentation – Manage Shape Text Options with Golang via C&#43;&#43;</title>
    <link>https://docs.aspose.com/cells/go-cpp/managing-shape-text-options/</link>
    <description>Recent content in Manage Shape Text Options with Golang via C&#43;&#43; on Documentation</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    
	  <atom:link href="https://docs.aspose.com/cells/go-cpp/managing-shape-text-options/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Gocpp: Setting Shadow of Text Effects of Shape or TextBox with Golang via C&#43;&#43;</title>
      <link>https://docs.aspose.com/cells/go-cpp/setting-shadow-of-text-effects-of-shape-or-textbox/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/go-cpp/setting-shadow-of-text-effects-of-shape-or-textbox/</guid>
      <description>
        
        
        

&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;

&lt;p&gt;You can set the &lt;strong&gt;Shadow&lt;/strong&gt; of &lt;strong&gt;Text Effects&lt;/strong&gt; for any Shape or TextBox. Please use the &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/shape/gettextbody/&#34;&gt;&lt;strong&gt;Shape.GetTextBody()&lt;/strong&gt;&lt;/a&gt; property. It provides access to the shape&amp;rsquo;s text settings and returns &lt;a href=&#34;https://reference.aspose.com/cells/cpp/aspose.cells/fontsetting/&#34;&gt;&lt;strong&gt;FontSetting&lt;/strong&gt;&lt;/a&gt; objects. After accessing it, set the &lt;strong&gt;Shadow&lt;/strong&gt; via the &lt;a href=&#34;https://reference.aspose.com/cells/cpp/aspose.cells.drawing/shadoweffect/getpresettype/&#34;&gt;&lt;strong&gt;FontSetting.GetPresetType()&lt;/strong&gt;&lt;/a&gt; property. This property is of the type &lt;a href=&#34;https://reference.aspose.com/cells/cpp/aspose.cells.drawing/presetshadowtype/&#34;&gt;&lt;strong&gt;PresetShadowType&lt;/strong&gt;&lt;/a&gt;, which has several values. Some of these are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;OffsetDiagonalBottomRight&lt;/li&gt;
&lt;li&gt;OffsetBottom&lt;/li&gt;
&lt;li&gt;OffsetDiagonalTopRight&lt;/li&gt;
&lt;li&gt;InsideLeft&lt;/li&gt;
&lt;li&gt;InsideCenter&lt;/li&gt;
&lt;li&gt;PerspectiveDiagonalUpperLeft&lt;/li&gt;
&lt;li&gt;PerspectiveDiagonalLowerRight&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;

&lt;p&gt;The following code snippet demonstrates the use of &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/shadoweffect/getpresettype/&#34;&gt;&lt;strong&gt;FontSetting.GetPresetType()&lt;/strong&gt;&lt;/a&gt; to set the shadow of text effects for a Shape or TextBox.&lt;/p&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/b414abd53259bbc47d2c3c0fe985395b.js?file=Examples-Go-CPP-SettingShadowOfTextEffectsOfShapeOrTextbox.go&#34;&gt;&lt;/script&gt;


      </description>
    </item>
    
    <item>
      <title>Gocpp: Change Character Spacing of Excel TextBox or Shape with Golang via C&#43;&#43;</title>
      <link>https://docs.aspose.com/cells/go-cpp/change-character-spacing-of-excel-textbox-or-shape/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/go-cpp/change-character-spacing-of-excel-textbox-or-shape/</guid>
      <description>
        
        
        

&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;

You can change the character spacing of an Excel text box or shape using the &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/textoptions/getspacing/&#34;&gt;&lt;strong&gt;TextOptions.GetSpacing()&lt;/strong&gt;&lt;/a&gt; property.
&lt;/div&gt;

&lt;p&gt;The following sample code changes the character spacing of the text box in an Excel file to 4 points and then saves it on disk.&lt;/p&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/b414abd53259bbc47d2c3c0fe985395b.js?file=Examples-Go-CPP-ChangeCharacterSpacingOfExcelTextboxOrShape.go&#34;&gt;&lt;/script&gt;


      </description>
    </item>
    
    <item>
      <title>Gocpp: Set Line Spacing of the Paragraph in a Shape or Textbox with Golang via C&#43;&#43;</title>
      <link>https://docs.aspose.com/cells/go-cpp/set-line-spacing-of-the-paragraph-in-a-shape-or-textbox/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/go-cpp/set-line-spacing-of-the-paragraph-in-a-shape-or-textbox/</guid>
      <description>
        
        
        

&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;

You can set the line spacing of the paragraph, its space before, and space after using the &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/textparagraph/getlinespace/&#34;&gt;&lt;strong&gt;TextParagraph.GetLineSpace()&lt;/strong&gt;&lt;/a&gt;, &lt;a href=&#34;https://reference.aspose.com/cells/cpp/aspose.cells.drawing.texts/textparagraph/getspacebefore/&#34;&gt;&lt;strong&gt;TextParagraph.GetSpaceBefore()&lt;/strong&gt;&lt;/a&gt; and &lt;a href=&#34;https://reference.aspose.com/cells/cpp/aspose.cells.drawing.texts/textparagraph/getspaceafter/&#34;&gt;&lt;strong&gt;TextParagraph.GetSpaceAfter()&lt;/strong&gt;&lt;/a&gt; properties of the &lt;a href=&#34;https://reference.aspose.com/cells/cpp/aspose.cells.drawing.texts/textparagraph/&#34;&gt;&lt;strong&gt;TextParagraph&lt;/strong&gt;&lt;/a&gt; class.
&lt;/div&gt;

&lt;p&gt;The following sample code explains the usage of the mentioned properties.&lt;/p&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/b414abd53259bbc47d2c3c0fe985395b.js?file=Examples-Go-CPP-SetLineSpacingOfTheParagraphInAShapeOrTextbox.go&#34;&gt;&lt;/script&gt;


      </description>
    </item>
    
    <item>
      <title>Gocpp: Rotate Text with Shape inside the Worksheet with Golang via C&#43;&#43;</title>
      <link>https://docs.aspose.com/cells/go-cpp/rotate-text-with-shape-inside-the-worksheet/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/go-cpp/rotate-text-with-shape-inside-the-worksheet/</guid>
      <description>
        
        
        &lt;h2 id=&#34;possible-usage-scenarios&#34;&gt;&lt;strong&gt;Possible Usage Scenarios&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;You can add text inside any shape using Microsoft Excel. If you add a shape using the very old Microsoft Excel 2003, then the text will not rotate with the shape. However, if you add a shape using newer versions of Microsoft Excel, such as 2007, 2010, 2013, or 2016, the text will rotate with the shape. You can control whether the text should rotate with the shape or not using the &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/shapetextalignment/getrotatetextwithshape/&#34;&gt;&lt;strong&gt;ShapeTextAlignment.GetRotateTextWithShape()&lt;/strong&gt;&lt;/a&gt; property. The default value of this property is &lt;strong&gt;true&lt;/strong&gt;, which means the text will rotate with the shape. If you set it to &lt;strong&gt;false&lt;/strong&gt;, the text will not rotate with the shape.&lt;/p&gt;
&lt;h2 id=&#34;rotate-text-with-shape-inside-the-worksheet&#34;&gt;&lt;strong&gt;Rotate Text with Shape inside the Worksheet&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;The following sample code loads the &lt;a href=&#34;64716896.xlsx&#34;&gt;sample Excel file&lt;/a&gt; that contains a triangle shape, and its text rotates with the shape. If you open the sample Excel file in Microsoft Excel and rotate the triangle shape, the text will also rotate with it. The code then sets the &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/shapetextalignment/getrotatetextwithshape/&#34;&gt;&lt;strong&gt;ShapeTextAlignment.GetRotateTextWithShape()&lt;/strong&gt;&lt;/a&gt; property to &lt;strong&gt;false&lt;/strong&gt; and saves it as the &lt;a href=&#34;64716897.xlsx&#34;&gt;output Excel file&lt;/a&gt;. If you now open the output Excel file in Microsoft Excel and rotate the triangle shape, the text will not rotate with it. Please see the following screenshot, which shows the effect of the code on the sample Excel file, for reference.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;rotate-text-with-shape-inside-the-worksheet_1.png&#34; alt=&#34;todo:image_alt_text&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;sample-code&#34;&gt;&lt;strong&gt;Sample Code&lt;/strong&gt;&lt;/h2&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/b414abd53259bbc47d2c3c0fe985395b.js?file=Examples-Go-CPP-RotateTextWithShapeInsideTheWorksheet.go&#34;&gt;&lt;/script&gt;


      </description>
    </item>
    
    <item>
      <title>Gocpp: Set Margins of Comment or Shape inside the Worksheet with Golang via C&#43;&#43;</title>
      <link>https://docs.aspose.com/cells/go-cpp/set-margins-of-comment-or-shape-inside-the-worksheet/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/go-cpp/set-margins-of-comment-or-shape-inside-the-worksheet/</guid>
      <description>
        
        
        &lt;h2 id=&#34;possible-usage-scenarios&#34;&gt;&lt;strong&gt;Possible Usage Scenarios&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Aspose.Cells allows you to set the margins of any shape or comment using the &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/fontsettingcollection/gettextalignment/&#34;&gt;&lt;strong&gt;Shape.GetTextAlignment()&lt;/strong&gt;&lt;/a&gt; property. This property returns the object of the &lt;a href=&#34;https://reference.aspose.com/cells/cpp/aspose.cells.drawing.texts/shapetextalignment&#34;&gt;&lt;strong&gt;Aspose.Cells.Drawing.Texts.ShapeTextAlignment&lt;/strong&gt;&lt;/a&gt; class, which has different properties e.g. &lt;a href=&#34;https://reference.aspose.com/cells/cpp/aspose.cells.drawing.texts/shapetextalignment/gettopmarginpt/&#34;&gt;&lt;strong&gt;GetTopMarginPt()&lt;/strong&gt;&lt;/a&gt;, &lt;a href=&#34;https://reference.aspose.com/cells/cpp/aspose.cells.drawing.texts/shapetextalignment/getleftmarginpt/&#34;&gt;&lt;strong&gt;GetLeftMarginPt()&lt;/strong&gt;&lt;/a&gt;, &lt;a href=&#34;https://reference.aspose.com/cells/cpp/aspose.cells.drawing.texts/shapetextalignment/getbottommarginpt/&#34;&gt;&lt;strong&gt;GetBottomMarginPt()&lt;/strong&gt;&lt;/a&gt;, &lt;a href=&#34;https://reference.aspose.com/cells/cpp/aspose.cells.drawing.texts/shapetextalignment/getrightmarginpt/&#34;&gt;&lt;strong&gt;GetRightMarginPt()&lt;/strong&gt;&lt;/a&gt;, etc., that can be used to set the top, left, bottom, and right margins.&lt;/p&gt;
&lt;h2 id=&#34;set-margins-of-comment-or-shape-inside-the-worksheet&#34;&gt;&lt;strong&gt;Set Margins of Comment or Shape inside the Worksheet&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Please see the following sample code. It loads the &lt;a href=&#34;61767851.xlsx&#34;&gt;sample Excel file&lt;/a&gt; that contains two shapes. The code accesses the shapes one by one and sets their top, left, bottom, and right margins. Please see the &lt;a href=&#34;61767852.xlsx&#34;&gt;output Excel file&lt;/a&gt; generated by the code and a screenshot showing the effect of the code on the output Excel file.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;set-margins-of-comment-or-shape-inside-the-worksheet_1.png&#34; alt=&#34;todo:image_alt_text&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;sample-code&#34;&gt;&lt;strong&gt;Sample Code&lt;/strong&gt;&lt;/h2&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/b414abd53259bbc47d2c3c0fe985395b.js?file=Examples-Go-CPP-SetMarginsOfCommentOrShapeInsideTheWorksheet.go&#34;&gt;&lt;/script&gt;


      </description>
    </item>
    
    <item>
      <title>Gocpp: Specify the Far East and Latin Name of the Font in Text Options of Shape with Golang via C&#43;&#43;</title>
      <link>https://docs.aspose.com/cells/go-cpp/specify-the-far-east-and-latin-name-of-the-font-in-text-options-of-shape/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/go-cpp/specify-the-far-east-and-latin-name-of-the-font-in-text-options-of-shape/</guid>
      <description>
        
        
        &lt;h2 id=&#34;possible-usage-scenarios&#34;&gt;&lt;strong&gt;Possible Usage Scenarios&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Sometimes you want to display text in a Far East language font, e.g., Japanese, Chinese, Thai, etc. Aspose.Cells provides &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/textoptions/getfareastname/&#34;&gt;&lt;strong&gt;TextOptions.GetFarEastName()&lt;/strong&gt;&lt;/a&gt; property that can be used to specify the font name for Far East languages. Besides, you can also specify the Latin font name using &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/textoptions/getlatinname/&#34;&gt;&lt;strong&gt;TextOptions.GetLatinName()&lt;/strong&gt;&lt;/a&gt; property.&lt;/p&gt;
&lt;h2 id=&#34;specify-the-far-east-and-latin-name-of-the-font-in-text-options-of-shape&#34;&gt;&lt;strong&gt;Specify the Far East and Latin Name of the Font in Text Options of Shape&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;The following sample code creates a text box and adds some Japanese text inside it. It then specifies the Latin and Far East font names of the text and saves the workbook as an output Excel file. The following screenshot shows the Latin and Far East font names of the output text box in Microsoft Excel.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;specify-the-far-east-and-latin-name-of-the-font-in-text-options-of-shape_1.png&#34; alt=&#34;todo:image_alt_text&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;sample-code&#34;&gt;&lt;strong&gt;Sample Code&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/b414abd53259bbc47d2c3c0fe985395b.js?file=Examples-Go-CPP-SpecifyTheFarEastAndLatinNameOfTheFontInTextOptionsOfShape.go&#34;&gt;&lt;/script&gt;

&lt;button class=&#34;floating-button&#34; id=&#34;openModalBtn&#34;&gt;AI Document Assistant&lt;/button&gt;

&lt;div class=&#34;modal&#34; id=&#34;modal&#34;&gt;
    &lt;button class=&#34;close-btn&#34; id=&#34;closeModalBtn&#34;&gt;Close&lt;/button&gt;
    &lt;iframe src=&#34;https://products.aspose.ai/cells/chat/document/go?source=docs&#34; frameborder=&#34;0&#34; width=&#34;100%&#34; height=&#34;100%&#34;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;style&gt;
    .floating-button {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: #007bff;
        color: white;
        border: none;
        padding: 15px 20px;
        border-radius: 50px;
        cursor: pointer;
        font-size: 16px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    .modal {
        display: none;
        position: fixed;
        top: 10%;
        left: 10%;
        width: 80%;
        height: 80%;
        background-color: white;
        border: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        padding: 20px;
        box-sizing: border-box;
    }

    .close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background-color: #f44336;
        color: white;
        border: none;
        padding: 5px 10px;
        cursor: pointer;
        font-size: 16px;
        border-radius: 3px;
    }
&lt;/style&gt;

&lt;script&gt;
    const openModalBtn = document.getElementById(&#39;openModalBtn&#39;);
    const closeModalBtn = document.getElementById(&#39;closeModalBtn&#39;);
    const modal = document.getElementById(&#39;modal&#39;);

    openModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;block&#39;;
    });

    closeModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;none&#39;;
    });

    window.addEventListener(&#39;click&#39;, function(event) {
        if (event.target === modal) {
            modal.style.display = &#39;none&#39;;
        }
    });
&lt;/script&gt;
&lt;/p&gt;

      </description>
    </item>
    
  </channel>
</rss>
