Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Dymanic ToolTip sizing?

Can the ToolTip script be dynamically sized based on content within?

That is, can the W and H of the code be pliable/smart enough to adjust based on the text that fills up the space?


[%ToolTip("linked phrase","contents of tooltip",W,H)%]
asked Dec 27, 2018 by WTW_cal Bronze (1,595 points)
Just a comment: You can pass W+H in as variables but you would have to pre-determine their values based on the tool tip contents.

To automate the process, particularly if you had many variations of W+H, would be something I would also be interested in also.

I'd be looking forward to a neat solution as you are.

1 Answer

0 votes
Width and height are options for the ToolTip() function, so you can leave them out and the tool tip should scale to whatever is inside the pop up box.  Most things tend to have some kind of max width setting behind the scenes so they don't become too big, so if you're trying to do something that needs to be really big we can probably take a look at what's going on behind the scenes and give you some CSS that would turn that off.
answered Dec 28, 2018 by Brian McEwan Platinum Sawtooth Software, Inc. (53,265 points)
I haven't tested the tool tips function without W+H parameters Brian. How does this work on mobile devices? I'll certainly give it a test.

Thanks Paul.
I think they should work better this way, as they are still going to be constrained by some max width settings behind the scenes.  Let me know if anything behaves funny.
I'll come back to you thanks Brian once I've had a chance to test it on various devices.