Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / February 2006

Tip: Looking for answers? Try searching our database.

Right justifying Arabic tooltips

Thread view: 
Swetha - 02 Feb 2006 13:13 GMT
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
Swetha - 02 Feb 2006 13:35 GMT
Back with one of the solutions this time : I just included <p
align="right"> to the text and this works.

Swetha
Roedy Green - 02 Feb 2006 20:16 GMT
> 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?
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Roedy Green - 02 Feb 2006 19:53 GMT
>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.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Swetha - 05 Feb 2006 15:25 GMT
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.