How to get the TooltipHeading

724
4
Jump to solution
06-20-2018 08:25 AM
BerendVeldkamp
Occasional Contributor II

I have a simple ArcGIS Pro add-in, with a button defined in the daml:

<button id="ProAppModule2_Button1" caption="Click me" className="Company.Project.Button1"
     loadOnClick="true"
     smallImage="Images\sample16.png"
     largeImage="Images\sample32.png"
     keytip="This is a tip">
    <tooltip heading="This is a heading">Tooltipbody<disabledText /></tooltip>
</button>‍‍‍‍‍‍‍‍

However, inside the button class the TooltipHeading is an empty string. (Tooltip contains the text 'Tooltipbody').

What am I missing?

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
UmaHarano
Esri Regular Contributor

Hi Berend,

Here is a snippet for this: Get a button's tooltip heading

Thanks

Uma

View solution in original post

4 Replies
EvanMosher
New Contributor II

In this example there is a open and close tag for disabledText, in your example you only have the 1 tag. This might be the cause?

<tooltip heading="Select By Rectangle">Select features by clicking them or dragging a box around them.                
<disabledText></disabledText>   
</tooltip>‍‍‍‍‍‍

-Evan

0 Kudos
BerendVeldkamp
Occasional Contributor II

No, that's basic XML: <disabledText></disabledText> is exactly equal to <disabledText />

UmaHarano
Esri Regular Contributor

Hi Berend,

Here is a snippet for this: Get a button's tooltip heading

Thanks

Uma

BerendVeldkamp
Occasional Contributor II

Great. All my buttons inherit from a single class (which in turn inherits from Button) so I put this in the base constructor:

var wrapper = FrameworkApplication.GetPlugInWrapper(ID);
TooltipHeading = wrapper.TooltipHeading;

Still, I don't really understand why the TooltipHeading is empty in the first place.

0 Kudos