Dojo TitlePane Tooltips

786
1
Jump to solution
12-14-2016 03:26 PM
ChristopherSchreiber
Occasional Contributor II

Hello,

I am working on a map that includes several Title Panes. I have replaced the Text in the title panes with images. Is it possible to create tool tips for the panes?

I have tried using the Dijit Tooltip class to display them, but it won't show when the title pane is created.

My code attempting to create the tooltips:

  //"BasemapTitle" is the Id for the TitlePane         
            var myTooltipDialog = new Tooltip({
                connectId: ["BasemapTitle"],
                content: "Basemap Gallery",
                position: ["below"]
            });‍‍‍‍‍‍

Thanks!

Chris

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Chris,

   If I wrap the titlepane in a div and give that div a title property (with means a tooltip) then I have no issue.

      <div style="position:absolute; right:20px; top:10px; z-Index:999;" title="blah blah">
        <div data-dojo-type="dijit/TitlePane" id="bmTitlePane"
             data-dojo-props="title:'Switch Basemap', closable:false, open:false">
          <div data-dojo-type="dijit/layout/ContentPane" style="width:380px; height:280px; overflow:auto;">
            <div id="basemapGallery"></div>
          </div>
        </div>
      </div>

View solution in original post

1 Reply
RobertScheitlin__GISP
MVP Emeritus

Chris,

   If I wrap the titlepane in a div and give that div a title property (with means a tooltip) then I have no issue.

      <div style="position:absolute; right:20px; top:10px; z-Index:999;" title="blah blah">
        <div data-dojo-type="dijit/TitlePane" id="bmTitlePane"
             data-dojo-props="title:'Switch Basemap', closable:false, open:false">
          <div data-dojo-type="dijit/layout/ContentPane" style="width:380px; height:280px; overflow:auto;">
            <div id="basemapGallery"></div>
          </div>
        </div>
      </div>