Layout property


Available for all objects except ImageList and Thread.

Read/Write at design time
Read/Write at run time

Specifies whether the layout for an object is left-to-right or right-to-left.

The layout for an object defines how text and Graphics Device Interface (GDI) objects are laid out in a window or control, the location of the origin and whether the horizontal coordinate increases as you go left or right. Most languages require a left-to-right (LTR) layout, but some languages, such as Arabic and Hebrew, require a right-to-left (RTL) layout.


For window objects (Window, MDIWindow and DialogBox) this property can be set to one of the following values:

0  Left-To-Right   The layout for the window is left-to-right (default)
1  Right-To-Left   The layout for the window is right-to-left. The origin is positioned at the right edge of the window.


For control objects (except ImageList and Thread), this property can be set to one of the following values:

0  Left-To-Right   The layout for the control is left-to-right.
1  Right-To-Left   The layout for the control is right-to-left. The origin is positioned at the right edge of the control.
2  Inherited   The layout for the control is inherited from its parent (default).

In visual projects, Group, Picture and Rebar objects can also have child controls, so please take that into account since a control with its property Layout set to "2 - Inherited" will always inherit the layout from its parent (which may NOT be the owner window). On the other hand, two methods are available for changing the layout at run time, GetLayoutRTL and SetLayoutRTL.


REMARKS: Version 1.06.0.0025 and later also make the Layout property visible at design time. This change will affect projects previous to version 1.06.0.0025 with a right-to-left (RTL) layout and you will probably have to re-position child controls. I am terribly sorry for this and I want to apologize for the inconveniences. From now on everything will work fine.

WARNING: This property has no effect if the running operating system is not a Windows bi-directional platform (Windows 2000 and later).