AnsweredAssumed Answered

Changing label text color in D4d (EGUI)

Question asked by Mark Watson on May 9, 2012
Latest reply on Dec 11, 2012 by ali_b34443

I am working with MQX 3.8 and EGUI on an MK60FX512 and I am attempting to produce labels with multiple text colors on a single screen.  Of course this should be feasible using different color schemes for each call to D4D_DECLARE_LABEL. However, when I try to do that the compiler (Ewarm 6.3) produces an error stating that the pscheme must be a constant..  This is despite the fact that I am creating the alternate color schemes using exactly the same call as that used to created the default color scheme:


D4D_DECLARE_CLR_SCHEME(d4d_clr_scheme_default, \
D4D_COLOR_SCR_DESKTOP, D4D_COLOR_SCR_OUTLINE, D4D_COLOR_SCR_TITLEBAR, D4D_COLOR_SCR_TILTLETEXT, D4D_COLOR_SCR_EXIT_BTN_FORE, D4D_COLOR_SCR_EXIT_BTN_BCKG,\
D4D_COLOR_BCKG_NORM, D4D_COLOR_BCKG_DISABLED, D4D_COLOR_BCKG_FOCUS, D4D_COLOR_BCKG_CAPTURE,\
D4D_COLOR_FORE_NORM, D4D_COLOR_FORE_DISABLED, D4D_COLOR_FORE_FOCUS, D4D_COLOR_FORE_CAPTURE,\
D4D_COLOR_GAUG_HUB, D4D_COLOR_GAUG_POINTER,\
D4D_COLOR_SLDR_BAR_BCKG, D4D_COLOR_SLDR_BAR_FORE, D4D_COLOR_SLDR_BAR_START, D4D_COLOR_SLDR_BAR_END,\
D4D_COLOR_CHECKBOX_ICON_BCKG,\
D4D_COLOR_GRAPH_GRID,\
D4D_COLOR_PRGRS_BAR_BAR_BCKG, D4D_COLOR_PRGRS_BAR_BAR_FORE, D4D_COLOR_PRGRS_BAR_BAR_END\
)

static D4D_CLR_SCHEME *pSchemeGreen = (D4D_CLR_SCHEME*)&d4d_clr_scheme_default;

 

When I try to use pSchemeGreen the compiler throws an error "expression must have a constant value"

 

I am guessing that this is something obvious, but I am stuck so any help would be appreciated.


Thanks.

Outcomes