Right justifying Arabic tooltips

Discussion in 'Java' started by Swetha, Feb 2, 2006.

  1. Swetha

    Swetha Guest

    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, Feb 2, 2006
    #1
    1. Advertising

  2. Swetha

    Swetha Guest

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

    Swetha
    Swetha, Feb 2, 2006
    #2
    1. Advertising

  3. Swetha

    Roedy Green Guest

    On 2 Feb 2006 05:13:49 -0800, "Swetha" <>
    wrote, quoted or indirectly quoted someone who said :

    >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.
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Java custom programming, consulting and coaching.
    Roedy Green, Feb 2, 2006
    #3
  4. Swetha

    Roedy Green Guest

    On 2 Feb 2006 05:35:26 -0800, "Swetha" <>
    wrote, quoted or indirectly quoted someone who said :

    > 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?
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Java custom programming, consulting and coaching.
    Roedy Green, Feb 2, 2006
    #4
  5. Swetha

    Swetha Guest

    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
    Swetha, Feb 5, 2006
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tom Parson
    Replies:
    1
    Views:
    494
    Daniel Dyer
    May 23, 2006
  2. Frank
    Replies:
    2
    Views:
    497
    BootNic
    Dec 7, 2006
  3. hg
    Replies:
    4
    Views:
    287
    Gabriel Genellina
    Jan 26, 2007
  4. mantrid

    Text box justifying

    mantrid, Jan 4, 2008, in forum: HTML
    Replies:
    2
    Views:
    366
    mantrid
    Jan 4, 2008
  5. Ronny
    Replies:
    0
    Views:
    137
    Ronny
    May 5, 2006
Loading...

Share This Page