PDA

View Full Version : Adding tooltips to Number fields



MadBeardMan
September 23rd, 2018, 13:44
Greetings All,

Been working on the Traveller ruleset and going to need to add some tooltips to some of the action fields, just to stop people wondering how they're going to work.

For example, Weapon Attack skill, it's built up from Characteristic + Skill, been wondering if I can show a tooltip that would say (for example)

"Dex +2, Gun Combat (Slug Rifle) +1, Total +3" (for when the Attack field shows '3').

Any thoughts on how I can do this? Just toying with a few ideas today.

Cheers,
MBM

Trenloe
September 23rd, 2018, 13:50
https://www.fantasygrounds.com/refdoc/windowcontrol.xcp#setTooltipText

And maybe use the onHover event to set the text: https://www.fantasygrounds.com/refdoc/windowcontrol.xcp#onHover

MadBeardMan
September 23rd, 2018, 13:54
https://www.fantasygrounds.com/refdoc/windowcontrol.xcp#setTooltipText

And maybe use the onHover event to set the text: https://www.fantasygrounds.com/refdoc/windowcontrol.xcp#onHover

Ok cool, (don't you ever sleep btw).

My issue is that there's a list of weapon attacks, and each one needs to be different. just need to get my head around this as I used 'onInit()' just to set a generic tool tip (via the setTooltipText) and it did nothing.

Cheers