Jump to content
Sign in to follow this  
Guest

How to get the % character in a tooltip.

Recommended Posts

Guest

HiI've run into a problem trying to display the % character inside a custom tooltip. The tooltip definitionWindow Defroster (%((L:Var1Slider,number) 100 * near)%!d!$)will give me "Window Defroster (50$)", but increasing to 37 doesn't give me the % sign, as expected. I've only checked with the character map util to find its code, even 176 yields

Share this post


Link to post
Share on other sites
Guest bartels

To display a percent sign in string or tooltip, try to double it. I just tried out:<String>%((A:TRANSPONDER1 CODE,number))%!f!%%</String>...<Tooltip>%((A:TRANSPONDER1 CODE,number))%!f!%%</Tooltip>and it works.The code itself doesn't make too much sense, it just shows the display of a percent sign.To display the xml-Code properly on the forum, I usually copy the code to Wordpad and use the "Replace All" feature (any other editor with replacing function will do) to replace all & by &, all < by < and all > by >. It is allways the & replacement first, <,>later. And don't use the forums preview feature, or you have to start over again.Arne Bartels

Share this post


Link to post
Share on other sites
Guest

Ok, thanks. I'll try the doubling method.Sounded a little odd though, I must admit :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...