IlvText and IlvTextField
This section introduces the IlvText and IlvTextField member functions specific to bidirectional languages.
These member functions let you perform conversions from logical to visual strings, and conversely:
IlShort
IlvTextField::visualFromLogical(IlShort visPos) const;
IlShort
IlvTextField::logicalFromVisual(IlShort logPos) const;
IlShort
IlvText::visualFromLogical(const IlvTextLocation& visPos) const;
IlShort
IlvText::logicalFromVisual(const IlvTextLocation& logPos) const;
Erroneous Bidi Behavior
The IBM-Bidi library misinterprets a number of characters when the string to convert is exclusively composed of the following characters:
! " # $ % ' ( ) * + , . / : < = > [ \ ] ^ _ ` { | } ~
To get around this problem, the classes
IlvText and
IlvTextField provide the following method:
void IlvTextField::bidiFix();
void IlvText::bidiFix();
This method only corrects the erroneous behavior of the IBM-Bidi library we have just mentioned. On Windows platforms (Server 2003/XP/Vista), this method has no effect.
This method must be called for all instances of
IlvTextField that are likely to use one of these characters at runtime. In particular, it is the case of the
IlvTextField objects that serve as filter entry forms.
Version 6.0
Copyright © 2015, Rogue Wave Software, Inc. All Rights Reserved.