<?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 Re: Customize widget title in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/customize-widget-title/m-p/822726#M7577</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sapna, thank you for responding to my question. I've tried the above code. I have altered it slightly and this is the results I get.&lt;/P&gt;&lt;P&gt;this.getPanel().titleLabelNode.style.textAlign = "center"&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;; //added semicolon&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt; this.getPanel().titleLabelNode.innerHTML =&lt;BR /&gt;"&amp;lt;p &amp;gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;Widget Title&amp;lt;br&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;lt;img src=\"images/app-logo.png\"alt=\"image\" style=\"width:24;height:24;\"&amp;gt;&amp;lt;font size=\"2\" &amp;gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;NameofFeature&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;";&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;Added the title of the widget and a new line indicator.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;This should accept a variable instead of hard coded text. The feature name will change based on the selected feature.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Center widget title" class="image-1 jive-image j-img-original" src="/legacyfs/online/345803_Center Widget Title.PNG" style="width: 620px; height: 43px;" /&gt;&lt;/P&gt;&lt;P&gt;As you can see the widget header needs to be increased in height to accomodate the extra title. Also, it does not appear to be centered. To me it should be more to the right to be correctly centered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank You,&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Apr 2017 22:06:54 GMT</pubDate>
    <dc:creator>GregRieck</dc:creator>
    <dc:date>2017-04-07T22:06:54Z</dc:date>
    <item>
      <title>Customize widget title</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/customize-widget-title/m-p/822724#M7575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to center the widget title? Then under the title add an image and the name of the selected feature? I am using this code to add the name of the feature to the title:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this.getPanel().titleLabelNode.innerHTML = NameOfFeature&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it shows up like this:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 22px;"&gt;Widget Title&lt;SPAN style="font-size: 15px;"&gt; : &amp;nbsp;NameOfFeature&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;With no image and not centered or on separate lines. I would like it to display more like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 22px;"&gt;Widget Title&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 15px;"&gt;IMAGE &amp;nbsp;NameOfFeature&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;Greg&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Apr 2017 18:00:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/customize-widget-title/m-p/822724#M7575</guid>
      <dc:creator>GregRieck</dc:creator>
      <dc:date>2017-04-04T18:00:44Z</dc:date>
    </item>
    <item>
      <title>Re: Customize widget title</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/customize-widget-title/m-p/822725#M7576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;code below should work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this.getPanel().titleLabelNode.style.textAlign="center"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.getPanel().titleLabelNode.innerHTML =&lt;/P&gt;&lt;P&gt;"&amp;lt;p &amp;gt;&amp;lt;img src=\"widgets/widgetname/images/icon.png\"alt=\"image\" style=\"width:15px;height:15px;\"&amp;gt;&amp;lt;font size=\"1\" &amp;gt;NameofFeature&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;";&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Apr 2017 15:40:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/customize-widget-title/m-p/822725#M7576</guid>
      <dc:creator>sapnas</dc:creator>
      <dc:date>2017-04-07T15:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: Customize widget title</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/customize-widget-title/m-p/822726#M7577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sapna, thank you for responding to my question. I've tried the above code. I have altered it slightly and this is the results I get.&lt;/P&gt;&lt;P&gt;this.getPanel().titleLabelNode.style.textAlign = "center"&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;; //added semicolon&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt; this.getPanel().titleLabelNode.innerHTML =&lt;BR /&gt;"&amp;lt;p &amp;gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;Widget Title&amp;lt;br&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;lt;img src=\"images/app-logo.png\"alt=\"image\" style=\"width:24;height:24;\"&amp;gt;&amp;lt;font size=\"2\" &amp;gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;NameofFeature&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;";&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;Added the title of the widget and a new line indicator.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;This should accept a variable instead of hard coded text. The feature name will change based on the selected feature.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Center widget title" class="image-1 jive-image j-img-original" src="/legacyfs/online/345803_Center Widget Title.PNG" style="width: 620px; height: 43px;" /&gt;&lt;/P&gt;&lt;P&gt;As you can see the widget header needs to be increased in height to accomodate the extra title. Also, it does not appear to be centered. To me it should be more to the right to be correctly centered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank You,&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Apr 2017 22:06:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/customize-widget-title/m-p/822726#M7577</guid>
      <dc:creator>GregRieck</dc:creator>
      <dc:date>2017-04-07T22:06:54Z</dc:date>
    </item>
    <item>
      <title>Re: Customize widget title</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/customize-widget-title/m-p/822727#M7578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you have to increase the height of titlelabelnode and push down the container of the widget. The below code should cover it.&amp;nbsp;regarding moving the title towards right&amp;nbsp;add padding to align the text to further right which is again modifying the style of the elements&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;this.getPanel().titleLabelNode.style.textAlign = "center";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.getPanel().titleLabelNode.style.height = "65px";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.getPanel().containerNode.style.top = "70px";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var nameOfFeature = "test";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var innerHTML = "&amp;lt;p&amp;gt;widget title&amp;lt;/p&amp;gt;&amp;lt;p style=\"height:300px;\"&amp;gt;&amp;lt;img src=\"widgets/widgetname/images/icon.png\" alt=\"image\" style=\"width:15px;height:15px;\"&amp;gt;&amp;lt;font size=\"1\" &amp;gt;" + nameOfFeature + "&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.getPanel().titleLabelNode.innerHTML = innerHTML;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Apr 2017 18:27:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/customize-widget-title/m-p/822727#M7578</guid>
      <dc:creator>sapnas</dc:creator>
      <dc:date>2017-04-10T18:27:45Z</dc:date>
    </item>
  </channel>
</rss>

