# Dynamic button tooltip

**URL:** https://discourse.nodered.org/t/dynamic-button-tooltip/7813
**Category:** Dashboard
**Created:** [10 February 2019 19:53 UTC](https://discourse.nodered.org/t/dynamic-button-tooltip/7813 "2019-02-10T19:53:30Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![fabnavigator](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fabnavigator/32/5403_2.png) [@fabnavigator](https://discourse.nodered.org/u/fabnavigator)
#### Post date: [10 February 2019 19:53 UTC](https://discourse.nodered.org/t/dynamic-button-tooltip/7813/1 "2019-02-10T19:53:30Z")

</div>

Hi,

Is there a way to set the button tooltip by sending it a message? If not, how hard is it to create a custom button node with this capability?

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [10 February 2019 20:48 UTC](https://discourse.nodered.org/t/dynamic-button-tooltip/7813/2 "2019-02-10T20:48:40Z")

</div>

hmm - not sure - you could try via - [https://github.com/node-red/node-red-dashboard/blob/master/config-fields.md](https://github.com/node-red/node-red-dashboard/blob/master/config-fields.md)  
The tooltip capability was added after that feature was added so it may just work despite not being mentioned in the docs... If you try it and it works please let us know and we can update the docs. (or indeed if it doesn't)

---

<div class="post-metadata">

### Author: ![fabnavigator](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fabnavigator/32/5403_2.png) [@fabnavigator](https://discourse.nodered.org/u/fabnavigator)
#### Post date: [11 February 2019 00:13 UTC](https://discourse.nodered.org/t/dynamic-button-tooltip/7813/3 "2019-02-11T00:13:51Z")

</div>

I wasn't able to get ui\_control to work at all. I injected into the function below, and connected it to the button input. It didn't do anything.

msg.ui\_control = { "color": "red" }  
return msg;

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [11 February 2019 09:02 UTC](https://discourse.nodered.org/t/dynamic-button-tooltip/7813/4 "2019-02-11T09:02:47Z")

</div>

I thought this was about tooltip ?  
color can be set by any msg property by setting the field to {{msg.propertyname}}

---

<div class="post-metadata">

### Author: ![fabnavigator](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fabnavigator/32/5403_2.png) [@fabnavigator](https://discourse.nodered.org/u/fabnavigator)
#### Post date: [11 February 2019 12:15 UTC](https://discourse.nodered.org/t/dynamic-button-tooltip/7813/5 "2019-02-11T12:15:03Z")

</div>

Sorry. I should have led with "tooltip didn't work". After that I tried one of the properties that was documented to work. That didn't work either so I have to assume that I'm not trying to set it properly. No example was included in the documentation. Even if toolltip never works, maybe you can update the documentation to include an actual example of how to use ui\_control.

---

<div class="post-metadata">

### Author: ![fabnavigator](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fabnavigator/32/5403_2.png) [@fabnavigator](https://discourse.nodered.org/u/fabnavigator)
#### Post date: [11 February 2019 18:54 UTC](https://discourse.nodered.org/t/dynamic-button-tooltip/7813/6 "2019-02-11T18:54:20Z")

</div>

I've switched from a button to a template node and I'm able to get the dynamic tooltip working.

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [11 February 2019 21:25 UTC](https://discourse.nodered.org/t/dynamic-button-tooltip/7813/7 "2019-02-11T21:25:07Z")

</div>

I just checked and send a msg into a button with msg.ui\_control set to `{ "tooltip":"Hello World" }` then it will update the tooltip... but only on refresh. So it is dynamic in that it can be set programatically - but you need to refresh for the config to be re-read.  
Using the template as you have done would allow instant updates so may suit your application better.

---

<div class="post-metadata">

### Author: ![fabnavigator](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fabnavigator/32/5403_2.png) [@fabnavigator](https://discourse.nodered.org/u/fabnavigator)
#### Post date: [12 February 2019 00:00 UTC](https://discourse.nodered.org/t/dynamic-button-tooltip/7813/8 "2019-02-12T00:00:14Z")

</div>

I was able to get that to work. Thanks for your help.

---

<div class="post-metadata">

### Author: ![henkkas](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/henkkas/32/39844_2.png) [@henkkas](https://discourse.nodered.org/u/henkkas)
#### Post date: [12 November 2021 10:29 UTC](https://discourse.nodered.org/t/dynamic-button-tooltip/7813/9 "2021-11-12T10:29:19Z")

</div>

@dceejay I have the same issue too. I got it to work with msg.ui\_control. But it will not "refresh" as was mentioned. How do I refresh? I dont want to use the ui\_template.
