Shiny Language Reference

Language Reference > User Interface > Edit Boxes


seteditboxfontcol

seteditboxfontcol(int ID, int RGBCol);

 

Sets the colour of the font used for the edit box

The SETEDITBOXFONTCOL statement sets the RGB colour of the font used for the text of an edit box previously created with createeditbox.

Any change to the font is carried out immediately, and the control is redrawn to reflect the new font style.

Note that this statement is approximately 4 times faster than seteditboxfont if the only requirement is to change the RGB colour of the font.

 

Parameters

ID

The control ID of the control you wish to change the style of

RGBCol

An integer representing a packed RGB colour value (refer to the RGB statement) specifying the colour of the caption text

 

Return Value

None

 

Example Code

// Create a 50x20 editbox at 10, 10 and store it's ID
int Id = createeditbox(1, 10, 10, 50, 20);

// Set the edit box font to red, 10pt Times New Roman
Italic.
seteditboxfont(Id, "Times New Roman", 10, RGB(255, 0, 0), False, True);

// Set the edit bot font to blue
seteditboxfontcol(Id, RGB(0, 0, 255));