Mixing Fonts in Tool Tips
Mixing Fonts in Tool Tips
(OP)
Does anyone know a way to mix fonts in Tool tips.
For example, I have a label for "Area = ", and when the cursor hovers over label, I want Tool Tip to display formula, i.e. area of a circle: "Area = (pi)*r^2". But instead of writing "(pi)", I'd rather use the symbol for pi, i.e. the letter "p" using symbol font while other parts of the Tool Tip would be in Arial.
Extra credit: I'd like for the "2" to be "superscript" rather than "^2".
For example, I have a label for "Area = ", and when the cursor hovers over label, I want Tool Tip to display formula, i.e. area of a circle: "Area = (pi)*r^2". But instead of writing "(pi)", I'd rather use the symbol for pi, i.e. the letter "p" using symbol font while other parts of the Tool Tip would be in Arial.
Extra credit: I'd like for the "2" to be "superscript" rather than "^2".
RE: Mixing Fonts in Tool Tips
RE: Mixing Fonts in Tool Tips
Thanks, that's a good idea & works with Arial. After looking at this approach, the Times Roman pi looks better but it seems the Tool Tips font is fixed (as Arial I suppose; several Fonts look similar & probably have same Chr numbers ???) because changing the label font has no effect on the Tool Tip font.
Many Thanks
RE: Mixing Fonts in Tool Tips
Regards,
Regg
RE: Mixing Fonts in Tool Tips
I'm impressed. Thanks much. Is there any way to change a Windows property from within a VB program, maybe an API call?
It seems that if not, you can't do much fancy with the other characters in a font (i.e. codes 178 & 182) because you just don't know which Tool Tip font they are using.
Your thoughts please.
Thanks,
Alan
RE: Mixing Fonts in Tool Tips
I imagine there is an API but I do not know what it is off hand. I have not done anything like that since Windows 3.1 (been out of programming for a few years). One thing you must remember. If you are planning on messing with other people's configurations, you better have your program inform the user of this change. I for one have a difficult time reading certain fonts. I have set mine (along with the font size)to those I can.
Seems to me I read a tip years ago on how to simulate a tool tip. I will page through my reference books when I get a chance and see if I can find it. Using that approach, you can set the font to one which will display ^2 and pi to your liking.
Regards,
Regg
RE: Mixing Fonts in Tool Tips
Thanks again.
Alan