Consultor Eletrônico



Kbase 16540: Stacked Column Labels and the Browse Widget
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/05/1998
Stacked Column Labels and the Browse Widget

If you are attempting to change the label of a column in a browse
widget at runtime and it is not changing correctly then you must
define the initial label for the column so that it contains the
maximum number of "stacked" lines which the column will ever have.

This is because we allow you to change the label at runtime but the
browse widget does not support resizing at runtime (not even column
labels).

For example,

Assume that you have a field called Customer.Name in your browse
widget and that you want to give this field a label at runtime that
is made up of 3 character strings.

First off, you must go to the properties sheet for the browse, open
the query and go to the fields section. Once you are there, you
should modify the Customer.Name fields "LABEL" so that it contains
a dummy label something like this ("A!DUMMY!LABEL").

Second, at runtime you can change the label by executing code similar
to the following:

/* The following is just a piece of demo code and does not reflect */
/* how you would truly code this in a real world situation. In a */
/* real world situation, you would probably not define 3 variables */
/* to hold a label if you already know what the "text" of the new */
/* label is going to be. This is just a demonstration. */

DEFINE VAR Label1 AS CHAR FORMAT "X(9)" INIT "This is a".
DEFINE VAR Label2 AS CHAR FORMAT "X(6)" INIT "3 High".
DEFINE VAR Label3 AS CHAR FORMAT "X(13)" INIT "Stacked Label".

ASSIGN Customer.Name:LABEL
IN BROWSE {&BROWSE-NAME} = TRIM(Label1) + "!" +
TRIM(Label2) + "!" +
TRIM(Label3).

Progress Software Technical Support Note # 16540