<<

Contents

Search

>>

 

EDITOR_SET_COLOR

 

 

Function

 

 

Syntax:

EDITOR_SET_COLOR(<Mask Field>,<F-Red>,<F-Green>,<F-Blue>,<B-Red>,<B-Green>,<B-Blue> [,<Handle>])

 

<Mask Field>

= <MASK FIELD>

<F-Red>

= <NUM-EXPRESSION>

<F-Green>

= <NUM-EXPRESSION>

<F-Blue>

= <NUM-EXPRESSION>

<B-Red>

= <NUM-EXPRESSION>

<B-Green>

= <NUM-EXPRESSION>

<B-Blue>

= <NUM-EXPRESSION>

<Handle>

= <NUM-EXPRESSION>

 

 

Meaning:

EDITOR_SET_COLOR sets the foreground color and/or background color in a Word Processor for later text insertion with EDITOR_INSERT.

 

<F-Red>,<F-Green> and <F-Blue> specify the foreground color. If any of the parameters is < 0, no foreground color is set.

 

<B-Red>,<B-Green> and <B-Blue> specify the background color. If any of the parameters is < 0, no background color is set.

 

<Handle> specifies the window that contains the word processor field. <Handle> can contain the window depth or the handle of a split window or a WINDOWCALL window. If the parameter <Handle> is missing, the word processor field must be on the current mask.

 

EDITOR_SET_COLOR returns always 0.

 

Attention: This function has no effect with Html programs.

 

Parameter:

Mask Field

Word Processor field

F-Red

Foreground color: Red value

F-Green

Foreground color: Green value

F-Blue

Foreground color: Blue valBe

B-Red

Background color: Red value

B-Green

Background color: Green value

B-Blue

Background color: Blue value

Handle

Window depth or handle of a split window or handle of a WINDOWCALL Window

 

Sample:

/* Red foreground color

H% = EDITOR_SET_COLOR(#5.#EDIT$,255,0,0,-1,-1,-1)

H% = EDITOR_INSERT(#5.#EDIT$,"This text is red")

IF H% <> 0

THEN ... Error ...

ENDIF

 

See also:

EDITOR_SET_STYLE

EDITOR_GET_CURSOR

EDITOR_GET_STYLEDTEXT$

EDITOR_GET_TEXT$

EDITOR_HAS_CHANGED

EDITOR_INSERT

EDITOR_LOAD_FILE

EDITOR_LOAD_STRING

EDITOR_SET_COLOR

EDITOR_SET_STYLE

EDITOR_RESET_CHANGED

GET_STYLEDTEXT_FROM_FILE$