CHGSTL

Summary


"Chgstl" is used to dynamically assign a style to the contents of a screen field.

Syntax

Chgstl [ class ] [ field_list]With style

Parameters

Element

Description

Restrictions

class

In the absence of this parameter, the default mask is used.

class describes an open mask by Mask order.

field_list

List of id_zones separated by the character ','.
By default, all the fields in the mask are involved.

None

id_zone

Identification of a field zone under one of the following forms :
variable_name
variable_name '('
exp_ind ')'
int_zones
rank_no
int_ranks
"="expr_c

The fields where the name is given must be defined in the corresponding mask.

exp_ind

Integer expression where the value is the index of the variable to be displayed.

The index must be in the interval defined by the repetition factor.

int_zones

Field interval, that is to say the two field names separated by the '-' (minus sign).

The two fields must belong to the corresponding mask.

rank_no

Integer number where the value is the rank number.

1 <= rank_no <= 99

int_ranks

Interval for the ranks, that is to say two rank numbers rank1 and rank2 separated by the character '-'

rank1 <= rank2

expr_c

Alphanumeric expression where the result is a variable name or a rank

 

style

String for the description in the css format.

 

Examples

# Allocation of the style containing the variable STYLE, 
# for the fields with the rank 1, 15 to 30, and to the fields CHP1, VAR to FIN for the current mask.

Chgstl1, 15-30, CHP1, VAR-FIN With STYLE

# Change the style for all the fields in the FACT abbreviation mask.
Chgstl[FACT] With STYLE

# Change the style of the fields in the current mask.
ChgstlWith STYLE

# Afllocation of default style
ChgstlCHP1 With ""

# Change the style of a cell in the grid
# COLUMN is a field in the grid section

ChgstlCOLUMN(nolign-1) With STYLE

# Change the style of a column in a grid
ChgstlCOLUMN With STYLE

# Change the style of a line in a grid
# NBLIG is the bottom of grid variable

ChgstlNBLIG(nolign-1) With STYLE

# Change of the style for the whole of the grid
# NBLIG is the bottom of grid variable
ChgstlNBLIG With STYLE

Description and comments

"Chgstl" is used to change the style for all or part of the contents of the fields in a mask. The style is defined by a name with which graphical characteristics are associated : text colour, background colour, character fonts, font size, attributes (underlined, italic, bold, crossed out).

If the style is not defined, there is no error but there is no application of a style.

If the style is not specified (  With ""  ), the default style is allocated. In Adonix X3, this default style is defined in the "Tools/Options/Fonts and styles" menu.

In a grid, it is not necessary to carryout an affzo (field assignment), in order to modify the style of a column however this is not the case for a line or a cell.

The order of the processing of the fields used is always that resulting from the entry ranks and the position of the fields in the screen. As a consequence, in order to change this order of processing, it is necessary to use several "Chgstl" instructions.

Similarly, when giving an interval of the fields to be processed, it is the order entry that is considered to determine which are the fields in the interval.

Remarks

Some limits exist in the styles applied to the deactivated fields (that is the value is not in the sense of the given context). this characteristic is obtained by the Adonix instruction named Grizo), and for displayed fields only (this characteristic is obtained by the Adonix instruction named Diszo). For more detail, see the paragraph "Limitation to the style management" in the presentation styles documentation. 

Associated errors

Error

Description

ERVARI (6)

Field does not exist in the given mask.

ERCLAS (7)

Mask not declared.

Associated keywords

MASK - DEFAULT - Chgtzn - Chgtbk - Chgfmt - Chgtfd - Chgstl - Titcol 


SUMMARY


Copyright © Sage 1999 - 2007