Visual Basic: Bi-Directional Programming

RightToLeft Property (Grid Control)

See Also    Example    Applies To

Bidirectional Features

The Grid control has a configurable cell matrix with several associated behaviors that provide an appearance and functionality familiar to Middle East or Latin users.

When the RightToLeft property is set to True:

  • Grid columns begin at the right boundary of the grid.

  • Fixed columns are located on the right side of the grid.

  • LeftCol identifies the rightmost visible column (the first column beyond the leftmost fixed column).

  • SelStartCol and SelStartRow together specify the cell in the upper-right corner of a selected range, while SelEndCol and SelEndRow specify the cell in the lower-left corner of a selected range.

  • If the ScrollBars property is set to 3, a vertical scroll bar is placed on the left of the grid and a horizontal scroll bar with the scroll box on the right is placed at the bottom. A ScrollBars property setting of 1 places only the horizontal scroll bar, while a setting of 2 places only the vertical scroll bar.

  • Cell values (grid Text property) have RTL reading order.

  • Data is automatically right aligned in each cell by setting the FixedAlignment and ColAlignment properties to 1-Right-aligned. Subsequently, the developer can independently configure cell data alignment by programmatically adjusting the FixedAlignment and ColAlignment properties at run time.

  • Cells filled with the Clip property fill from right to left beginning at the upper rightmost selected cell.

When the RightToLeft property is set to False, the control behavior is the same as described in the standard Grid control documentation. Data is automatically left aligned in each cell by setting the FixedAlignment and ColAlignment properties to 0-Left-aligned. Subsequently, the developer can independently configure cell data alignment by programmatically adjusting the FixedAlignment and ColAlignment properties at run time.

Developer's Tip

The FixedAlignment, ColAlignment, and Clip properties can be set only in run time. They are not available in design time.