* * *

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

wp

  • Hero Member
  • *****
  • Posts: 4910
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 »
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10

Blaazen

  • Hero Member
  • *****
  • Posts: 2607
  • 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.1.0 r59015M FPC 3.3.1 r39660 x86_64-linux-qt Chakra, Qt 4.8.7/5.11.1, Plasma 5.13.4
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.14

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

m.abudrais

  • New member
  • *
  • Posts: 24
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.

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus