Tooltips in C# and RightToLeft property

  • Thread starter Thread starter Vince
  • Start date Start date
V

Vince

How are we suppose to use tooltips for rightToLeft languages as there
is no such property on the tooltip control?

I could not find any example on the web that successfully shows the
tooltip control for bidi languages.

Thanks for the help!

Vincent
 
I solved this issue by overriding the tooltip Drawing event (set
OwnerDraw to true) and setting the text format flags to:

private static void tooltip_Draw_ForRightToLeft(object sender,
DrawToolTipEventArgs e)
{
// overriden to show tooltip rightToLeft
e.DrawBackground();
e.DrawBorder();

TextFormatFlags sf = TextFormatFlags.Right |
TextFormatFlags.RightToLeft;
e.DrawText(sf);
}

Vincent
 
Back
Top