Right justifying Arabic tooltips

S

Swetha

Hello

I am trying to create tooltips in Arabic. Though the Arabic characters
are displayed correctly and they read from right to left, I am not able
to set the alignment for the tooltip as right justified. Hence, the
right-to-left Arabic text is left justified and this looks weird. Does
anyone have any ideas how I can solve this?

Regards
Swetha
 
S

Swetha

Back with one of the solutions this time : I just included <p
align="right"> to the text and this works.

Swetha
 
R

Roedy Green

I am trying to create tooltips in Arabic. Though the Arabic characters
are displayed correctly and they read from right to left, I am not able
to set the alignment for the tooltip as right justified. Hence, the
right-to-left Arabic text is left justified and this looks weird. Does
anyone have any ideas how I can solve this?

Don't tooltips shrink to fit?
Are you doing multiline tooltips?

Or do you mean how the tooltip
aligns with where the mouse is?

In my own experments I discovered
the right to leftness was
triggered simply by the
presence of Hebrew/Arabic characters.

The alignment was up to you.
 
R

Roedy Green

I just included <p
align="right"> to the text and this works.

you mean like embedded HTML?

Did you have add anything else or do anything to tell it this was HTML
not simple text?
 
S

Swetha

Roedy

Well, the right to left of the text is triggered just by the presence
of Arabic characters, but the alignement(righ/left-justify) is not.
Hence you have to explicitly specify the alignment, if the tooltips are
multiline, or else you have right-to-left Arabic text which is by
default aligned to the left.

Ans about the embedded HTML, I just added "<html><p align = "right"> to
the beginning of the string. So the code finally was something like:

label1.setToolTip("<html><p align = \"right\">Click here for more
info");

Swetha
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top