Recent

Author Topic: Right-to-left question  (Read 9119 times)

wp

  • Hero Member
  • *****
  • Posts: 11830
Right-to-left question
« on: May 19, 2018, 11:28:45 pm »
TStringGrid can display in its header icons taken from an ImageList. These icons can be positioned to the left or to the right of the caption (TGridColumn.Title.ImageLayout = blGlyphLeft or blGlyphRight)

My question to anybody from the RTL cultures: Should these icons be mirrored? Or more precisely: If ImageLayout is blGlyphLeft should the icon be painted to the left or to the right of the caption if BiDiMode is set to right-to-left reading?

What I learned from other discussions here is that in RTL mode everything should be mirrored. But this would be mean the words "Left" and "Right" will change their meaning.
« Last Edit: May 20, 2018, 12:20:41 am by wp »

Blaazen

  • Hero Member
  • *****
  • Posts: 3237
  • POKE 54296,15
    • Eye-Candy Controls
Re: Right-to-left question
« Reply #1 on: May 20, 2018, 01:09:02 am »
@ But this would be mean the words "Left" and "Right" will change their meaning.

Yes, and it is correct.

Try this: Put TLabel on the form and set AutoSize to False, increase its width. Text is aligned to the left because property Alignment is taLeftJustify. Now set BiDiMode to bdRightToLeft and text is on the right (although Alignment is still taLeftJustify). And change to taRightJustify aligns text to the left.

I implemented it this way everywhere in ECControls too.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

m.abudrais

  • Jr. Member
  • **
  • Posts: 52
Re: Right-to-left question
« Reply #2 on: August 23, 2018, 10:25:01 pm »
Quote
But this would be mean the words "Left" and "Right" will change their meaning.
yes.
you can think of taLeftJustify as text first, image next.
but in RTL Language first is to write.

 

TinyPortal © 2005-2018