measuring string
-
Hi I have a status bar in my main form. This status bar displays different text. I need to display a tooltip with a text (on mouse over) if the text is too large to fit into the status bar - if it's not completely visible (similar functionality as in Visual Studio). How do I determine if the length of the text string is larger than the current width of the status bar panel? I currently use Graphics.MeasureString method, but results are not consistent. Thank you in advance :confused:
-
Hi I have a status bar in my main form. This status bar displays different text. I need to display a tooltip with a text (on mouse over) if the text is too large to fit into the status bar - if it's not completely visible (similar functionality as in Visual Studio). How do I determine if the length of the text string is larger than the current width of the status bar panel? I currently use Graphics.MeasureString method, but results are not consistent. Thank you in advance :confused:
Results are not consistent because of different font types. You might like to use system font. - ashish