Logo

Hacker’s Guide to Visual FoxPro
An irreverent look at how Visual FoxPro really works. Tells you the inside scoop on every command, function, property, event and method of Visual FoxPro.

RightToLeft

This property determines whether text in a control runs from left to right (as in usual in Western languages) or right to left (as they do it in Middle Eastern languages).

Usage

oObject.RightToLeft = lReadRightToLeft
lReadRightToLeft = oObject.RightToLeft

This is another of those items that we can’t really test properly. It only kicks in if you’re using a Middle Eastern version of Windows. The basic idea is sound, though—in those languages where text is normally read from right to left, you want it to work that way, but not for every control. After all, even in those languages, numeric digits still run left to right. So this property lets you handle things at the individual control level.

In our U.S. English versions of Windows, changing it doesn’t cause any weirdness; VFP simply ignores us. There is one strange behavior here. The property sheet shows .T. as the default value for this property, but behaves in all other ways as if .F. were the default. Doesn’t seem to do any harm, though.

Note that this property has nothing to do with whether text is aligned to the left or to the right in a control. Use Alignment for that one.

Example

ThisForm.txtFirstName.RightToLeft = .T.

See Also

Alignment