eGUI label properties change unexpectedly

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

eGUI label properties change unexpectedly

698 Views
mikethomas
Contributor II

I am using the eGUI library with the TWR-K40 board. Codewarrior 10.3

The eGUI was downloaded from the Freescale site 1 week ago, so I am assuming it is the latest and greatest.

Experience with Kinetis ARM processors: about 10 days

Experience with eGUI: about 3 days.

Within a project, I have declared 4 labels using D4D_DECLARE_STD_LABEL.

The first problem is that when the labels are rendered, they don't seem to match the default foreground and background colors specified in the d4d_user_cfg.h

file  (D4D_COLOR_FORE_NORM and D4D_COLOR_BCKG_NORM) I even went so far as to change ALL the color schemes (D4D_COLOR_FORE_FOCUS, D4D_COLOR_BCKG_FOCUS, ..._DISABLE, ..._CAPTURE, etc...) to the color I want , with no luck . So to temporarily remedy that, I used code to get a pointer to the objects, set the foreground and background colors in the scheme using the 'fore' and 'bckg' structure members, then invalidating the object to redraw it. This seems to work until I change the text of  the 2nd, 3rd, or 4th label. When that happens, the colors for the  1st label are sometimes back to the original (unwanted) color scheme or sometimes the foreground and background colors are random. After some experimentation, I found that if I set the colors just before setting the text, the scheme colors persist as set, but I am clearly doing something wrong.

Anybody experience this problem ?

Tags (4)
0 Kudos
1 Reply

443 Views
Ali_Pina
NXP Employee
NXP Employee

Hi Mike

Could you share me how you are setting the color scheme to the label definitions?

Per your description I think you need to declare the color schemes in ram. Unfortunately the version you are using does not have this feature so you have to implement it but I am attaching an example using eGUI 3.0 (already have inram implementation) version and MQX 4.0 in aTWR-K70/TWR-LCD-RGB. The example declares 2 labels with different color schemes and changes the text every 0.5. Please refer to label_screen.c in D4D_User_Files folder.

Please let me know if this helps or provide more details.

Hope this helps!

-Alí

0 Kudos