|
textarea - text area gadget red,green,blue - colour components, 0 to 255 background (optional) - 0 colours the text itself (default); any other value colours the background |
|
Sets the text colour or the background colour of a text area. Two calls give the classic dark console look for a build-log pane: SetTextAreaColor logArea,30,30,30,True ; dark background SetTextAreaColor logArea,220,220,220 ; light text Background mode repaints the whole control. Text mode recolours all the text currently in the area - and because it reformats everything, it also wipes any per-range colours, bold and italic applied earlier with FormatTextAreaText. Set the base colour first, then apply highlights. Text typed or added later uses the control's current formatting at the insertion point, so recolour after big programmatic rewrites if you need everything uniform. Values outside 0-255 are clamped. In the Light and Dark GUI themes, text you have not coloured follows the theme, and changes colour when the theme does. Colours you set are kept in every theme. So is a background you set: text you have not coloured is then drawn in black or white, whichever reads better on it. See also: FormatTextAreaText, SetTextAreaFont, CreateTextArea, SetPanelColor, SetGuiTheme. |