|
|
Classification: |
C++ |
Category: |
EIKON |
Created: |
08/10/2000 |
Modified: |
06/29/2001 |
Number: |
FAQ-0516 |
Platform: |
Not Applicable |
|
Question: How can I truncate a descriptor to fit into a specific width, adding an ellipsis if necessary?
Answer: Text truncation can be performed by the Eikon TextUtils class. The TextUtils::ClipToFit() method adjusts a descriptor to fit a supplied width in pixels in a given font. If the text does not fit the width a truncation character is added to the end and the buffer is adjusted to fit. By default,
the Ellipsis (…) character is used as the truncation character.
The TextUtils class contains other text adjustment methods such as truncating a descriptor to a maximum number of characters.
See EIKTXTUT.H for more information.
|
|
|