Release 10.1A: OpenEdge Development:
Translation Manager

> ## Creating adjustable text on rectangles

> Developers often overlay text over rectangles in graphical interfaces, especially for three-dimensional applications or for radio sets where the rectangle creates a border for the radio options. If the developers use an absolute boundary to eliminate space to the right of the last letter of text for the source language, when you translate the application, the target text phrase might be truncated or have too much extra space. To avoid this problem, developers should use run--time adjustments as illustrated in the following code example. In this example, the `FONT–TABLE` object allows the width of the object to grow or shrink as needed.

> This requires more coding but provides a uniform and predictable interface for translation, as follows:

>     DEFINE VARIABLE ThisLabel AS CHAR VIEW-AS TEXT SIZE 10 BY 1.
>     DEFINE RECTANAGLE Rect1 SIZE 1 BY 1 FONT 4.
>     DEFINE FRAME x
>         Rect1 IN ROW 1.5 COL 1.5
>         ThisLAbel IN ROW 1.25 COL 2
>     WITH 1 DOWN FONT 4.

>     ThisLabel = "options".
>     ThisLabel:SCREEN-VALUE=ThisLabel.
>     ThisLabel:WIDTH=font-table:get-text-width-chars(ThisLabel,ThisLabel:font).

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095