Just another short question while you're here: how about adding Alignment property...?
Just to be sure -- You mean text alignment (which will override BidiMode, like CalAlignment overrides BidiMode)?
Currently, text alignment is controlled by BidiMode only (try it, but to see it, first set AutoSize to false and make the control wider).
I could add it, but as I see now how it is implemented in TLabel and TEdit, the behaviour is not consistent:
TLabel:
when BidiMode = bdRightToLeft, then everything is contra - when Alignment = taLeftToRight then the text is aligned to right side of the control and when taRightToLeft then to the right side
TEdit:
when BidiMode = bdRightToLeft, the text is aligned to right side, with both taLeftToRight and taRightToLeft.
In both these controls, when Alignment = taCenter, then BidiMode is ignored (as expected).
And in both controls, when BidiMode is bdRightToLeftNoAligned or bdRightToLeftReadingOnly, then they behave like bdLeftToRight. I don't understand what these are for.
I'd say, TEdit behaviour is probably a bug. However, I'm not satisfied with the way TLabel behaves either.
I would rather have taLeading and taTrailing added to this enumeration, which would behave like TLabel behaves with taLeftToRight and taRightToLeft respectively (they would follow BidiMode). Then, taLeftToRight and taRightToLeft would override BidiMode behaviour. And taLeading would be the default.
I could add a new enumeration in DateTimePicker for this Alignment property... However, I don't like not to follow the defaults...
Delphi's control does not have this property either.
But we are better than Delphi, of course (except for small inconvenience with focus
).
I don't know; Is text alignment really needed?