PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK

  • Modifying the writing direction in a window
  • Modifying the writing direction in a control
  • Required configuration
  • Actual writing direction
  • Limits
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
..TextDirection is used to find out and modify the writing direction used in a window, in a report or in a control (useful for managing languages such as Arabic or Hebrew).
Note: The writing direction of a language can be defined in the linguistic options of the project ("Project .. Project description", "Languages" tab, "Various" linguistic options, "Text direction").Note: The writing direction of a language can be defined in the linguistic options of the project:
  • On the "Project" pane, in the "Project" group, click "Description".
  • In the "Languages" tab, select the "Various" linguistic options and configure the "Text direction".
Example
// Change the writing direction for all the window controls
IF WIN_Edit..TextDirection = tdDefault THEN
WIN_Edit..TextDirection = tdRightToLeft
END
Syntax

Finding out the writing direction currently used in a window, report or control Hide the details

<Result> = <Element name>..TextDirection
<Result>: Integer constant
Writing direction currently used. This constant can correspond to one of the following values:
tdRightToLeftText written from right to left.
tdDefaultDefault writing direction (writing direction defined for the current language in the characteristics of the project).
tdLeftToRightText written from left to right.
<Element name>: Character string (with or without quotes)
Name of the element (window, report or control) for which the writing direction is requested.

Modifying the writing direction used in a window, report or control Hide the details

<Element name>..TextDirection = <New direction>
<Element name>: Character string (with or without quotes)
Name of the element (window, report or control) for which the writing direction must be modified.
<New direction>: Integer constant
New writing direction. This constant can correspond to one of the following values:
tdRightToLeftText written from right to left.
tdDefaultDefault writing direction (writing direction defined for the current language in the characteristics of the project).
tdLeftToRightText written from left to right.
Remarks

Modifying the writing direction in a window

When the writing direction is reversed in a window (tdRightToLeft constant):
  • The marker of the window is modified. The window origin (0, 0) changes from the top left corner to the top right corner. The x-axis is oriented to the left. The anchor of controls is modified accordingly.
  • The controls are displayed in "mirror".
  • All the controls defined by the tdDefault constant are changed to tdRightToLeft: the captions of the controls are displayed on the right side of the control, the scrollbars are displayed on the left side of the control, ...

Modifying the writing direction in a control

When the writing direction is reversed in a control (tdRightToLeft constant), only the display mode of the control is modified: the captions of the controls are displayed on the right side of the control, the scrollbars are displayed on the left side of the control, ...

Required configuration

The languages written from right to left are supported by the Windows versions later than Windows 95 and NT4.
To enable this option:
  1. Display the control panel ("Start .. Control panel").
  2. Select "Regional and linguistic options".
  3. In the "Languages" tab, select "Install the files for the languages with right-to-left complex script".
  4. Validate.

Actual writing direction

If the writing direction corresponds to the tdDefault constant, ..RightToLeft allows you to find out the "actual" writing direction. This property returns True if the actual writing direction goes from right to left and False if the actual writing direction goes from left to right.

Limits

Versions 15 and later
In the reports, this property is available for the following elements:
  • Report.
  • Static control.
  • Calculated control.
  • RTF control.
  • Preset control.
  • Link control.
  • Edit control.
  • Versions 17 and later
    Chart control.
    New in version 17
    Chart control.
    Chart control.
  • Item control.
New in version 15
In the reports, this property is available for the following elements:
  • Report.
  • Static control.
  • Calculated control.
  • RTF control.
  • Preset control.
  • Link control.
  • Edit control.
  • Versions 17 and later
    Chart control.
    New in version 17
    Chart control.
    Chart control.
  • Item control.
In the reports, this property is available for the following elements:
  • Report.
  • Static control.
  • Calculated control.
  • RTF control.
  • Preset control.
  • Link control.
  • Edit control.
  • Versions 17 and later
    Chart control.
    New in version 17
    Chart control.
    Chart control.
  • Item control.
Minimum version required
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment