GuiSetColors
- set colors for GUI controls

GUI functions
(AmiBroker 4.30)


SYNTAX GuiSetColors( idFrom, idTo, border , clrText = -1, clrBack = -1, clrBorder = -1, clrSelText = -1, clrSelBack = -1, clrSelBorder = -1, clrHoverText = -1, clrHoverBack = -1, clrHoverBorder = -1, clrDisText = -1, clrDisBack = -1, clrDisBorder = -1)
RETURNS NOTHING
FUNCTION The function defines custom colors for on-chart GUI controls

Parameters:

  • idFrom, idTo - define range of control IDs that will use new colors. To set color for single control use the same value for both idFrom and idTo
  • border - defines border width of button (does not affect other control types)
  • clrText, clrBack, clrBorder - define colors of control text (fgcolor), background (bgcolor) and border (if border width is > 0 ) in "default" control state (unselected) selectfgcolor. -1 means colorDefault and if all colors are set to default then control uses SYSTEM (Windows) look
  • clrSelText, clrSelBack, clrSelBorder - define colors in selected state
  • clrHoverText, clrHoverBack, clrHoverBorder - define colors in hover (mouse over) state
  • clrDisText, clrDisBack, clrDisBorder - define colors in disabled state

Please note that currently only buttons support custom colors and custom border As for v6.21 Edit fields always use system look

EXAMPLE
SEE ALSO GuiSetFont() function

References:

The GuiSetColors function is used in the following formulas in AFL on-line library:

More information:

See updated/extended version on-line.