Can I align text at the tip of the C # ball?

I wrote a small C # program that displays text in tea from time to time. When the text is written in English, there is no problem: everything is left aligned and readable, but sometimes I have Hebrew text and the left alignment of the RTL language gets all bad. I was wondering if there is a way to correctly align Hebrew text?

Google pointed me to articles that might help me change the color and font of the ball, but none of them have an alignment argument.

Is it possible?

Any help will be appreciated. John

+2


a source to share


2 answers


The WF ToolTip control uses the Form's RightToLeft property to determine how to align its text. Displaying RTL text when you have a form that displays text from left to right is an unusual requirement not covered by the class. Setting the shape's RightToLeft property to Yes before displaying the tooltip doesn't look very nice.



An alternative is to use a custom drawing by setting the OwnerDraw property of the tool tip to True. A good example of a Draw event handler is available in the MSDN Library . You will want to use TextFormatFlags.RightToLeft.

+1


a source


I managed to follow the custom of drawing the tooltip from right to left, but is there a way to do this for the BalloonTip ? And since I forgot to mention this in my first post, my program is a standard WinForms program.



0


a source







All Articles