Graphics.StringDirection
From Xojo Documentation
This item was deprecated in version 2019r2. Please use Graphics.TextDirection as a replacement. |
Method
Graphics.StringDirection(text As String) As Integer
New in 2005r1
Supported for all project types and targets.
New in 2005r1
Supported for all project types and targets.
Returns an Integer that indicates the direction in which the text is written.
Notes
This is useful for non-Roman systems, especially Middle-Eastern languages. If you pass an empty string, it returns the system default string direction. If this function is not supported on the user's system, it will return -1; otherwise it will return either 0 for left to right or 1 or right to left.
There are three class constants that you can use to test the string direction:
Class Constant | Value |
---|---|
TextDirectionUnknown | -1 |
TextDirectionLeftToRight | 0 |
TextDirectionRightToLeft | 1 |
Sample Code
This example gets the string direction.