PDA

View Full Version : Tooltips - can they work on data inside a field



MadBeardMan
May 13th, 2018, 13:32
Greetings All,

Within the Traveller World data, you have bases/trade codes, using 1 and 2 digit codes.

For example:

trade codes: Ni Lo

I'd like to show them as a tooltip as 'Non-Industrial' and 'Low Population'.

If it's not possible. I can go down the longer route of swapping the codes for the full string, and then upon leaving the trade codes field work out the 'short code' to update the World Profile. I'd prefer not to do this as spelling mistakes can be easy.

Cheers,
MBM

Ken L
May 13th, 2018, 14:19
You can try playing around with onHover which is part of windowcontrol which fields are derived from. You can change the tool-tip text to process whatevers' in the field. I'm not sure it'll update timely though, you may need to hover, leave, then re-hover for it to show the update.

MadBeardMan
May 13th, 2018, 14:39
You can try playing around with onHover which is part of windowcontrol which fields are derived from. You can change the tool-tip text to process whatevers' in the field. I'm not sure it'll update timely though, you may need to hover, leave, then re-hover for it to show the update.

Cheers for that idea, I'll try it later!

Trenloe
May 13th, 2018, 16:20
See setTooltipTexxt: https://www.fantasygrounds.com/refdoc/windowcontrol.xcp#setTooltipText

You could use this in the control's OnInit function to set the initial value, and then again as part of the onValueChanged (https://www.fantasygrounds.com/refdoc/stringcontrol.xcp#onValueChanged) event when the strong control value changes.

MadBeardMan
May 13th, 2018, 18:03
See setTooltipTexxt: https://www.fantasygrounds.com/refdoc/windowcontrol.xcp#setTooltipText

You could use this in the control's OnInit function to set the initial value, and then again as part of the onValueChanged (https://www.fantasygrounds.com/refdoc/stringcontrol.xcp#onValueChanged) event when the strong control value changes.

Hi Chap,

Ok cheers, I'll look later, just finished entering all the World Data for Tripwire into v1.0.6.