Author Topic: Change the font in a Mouseover Tooltip?  (Read 1488 times)

0 Members and 1 Guest are viewing this topic.

Keith Brown

  • Swamp Rat
  • Posts: 601
Change the font in a Mouseover Tooltip?
« on: December 25, 2012, 12:20:56 PM »
Does anyone have any idea on how to change the font on the rollover tooltips on objects in the drawing area?  I have some data that I am passing to a tooltip in 2 columns.  I cannot get the columns to line up because the font that is being used is not a monotype font.  All of the characters take up a different amount of space so using string.padright doesnt work.  The strings are all of the same length but appear different due to the font padding.
 
I have manually changed the system tooltip font but that doesnt change the rollover tooltips for objects in the drawing area.  It will however change the ribbon tooltips.  I believe I have seen an app in the past that was able to align two different columns in a tooltip but I havent been able to figure out how they did it.  My prefered method would be to just change the font right before I call e.appendtooltiptext(str) and then change it back when finished.  I am just not sure how to do this. 
 
Any ideas?
Keith Brown | AutoCAD MEP Blog | RSS Feed
AutoCAD MEP 2014 / Revit MEP 2014 / EastCoast CAD/CAM addon / Visual Studio 2013

owenwengerd

  • Bull Frog
  • Posts: 451
Re: Change the font in a Mouseover Tooltip?
« Reply #1 on: December 25, 2012, 02:37:46 PM »
I'm not sure whether or how to change the font for AutoCAD's tooltips, but if you want complete control over the tooltip content you may be interested in my shareware Periscope utility. With Periscope you can create custom extenders that use simple HTML code, including the table tag, to format the tooltip content.

Keith Brown

  • Swamp Rat
  • Posts: 601
Re: Change the font in a Mouseover Tooltip?
« Reply #2 on: December 26, 2012, 04:28:54 PM »
Hi Owen,

Thanks for the reply.  I looked at Periscope and that is a nice little utility.

I have developed my application for Autocad MEP and Autocad Architecture.  What it does is display any information that is in a property set in a tooltip.  I am able to get all of the information assembled correctly and displayed in the tooltip it just looks like crap.  I have spent too much time trying to get it to display correctly so I am moving to another solution.  I think I am just going to blank out the Autocad ToolTip and display my own form in its place.  I can then have full control over the display including the fonts, text size, etc.   I am currently having some difficulty getting the location of the mousepoint and then passing it to the form start location.  Any ideas?
Keith Brown | AutoCAD MEP Blog | RSS Feed
AutoCAD MEP 2014 / Revit MEP 2014 / EastCoast CAD/CAM addon / Visual Studio 2013

owenwengerd

  • Bull Frog
  • Posts: 451
Re: Change the font in a Mouseover Tooltip?
« Reply #3 on: December 26, 2012, 09:23:53 PM »
Sorry, I don't know whether it's even possible to get anything robust working without at least using native code under the hood. If you decide to use Periscope, contact me via email and I'll be happy to help you create a custom extender.