Hi
I am displaying a text box widget on the screen wihtout making it a child of another window.
No matter what I do, the text box is drawn on a black background.
I have tried the following:
- WM_SetDesktopColor(GUI_WHITE);
- TEXT_SetBkColor(hText, GUI_WHITE); (hText being the handle of the TEXT widget)
- Adding #define TEXT_DEFAULT_BK_COLOR GUI_WHITE to TEXT.h
The code creating the TEXT widget is:
void MainTask(void)
{
TEXT_Handle hText;
hText = TEXT_CreateEx(162, 40, 88, 70,0, WM_CF_SHOW, TEXT_CF_HCENTER | TEXT_CF_VCENTER, 0, "Everything you wanted to know about fruit but were too afraid to ask.");
TEXT_SetBkColor(hText, GUI_WHITE);
TEXT_SetWrapMode(hText, GUI_WRAPMODE_WORD);
while (1) {
GUI_Delay(100);
}
}
The GUI is in another task as follows
static void DisplayInit(void) {
OS_Suspend (&TCBMT);//MainTask
GUI_Init();
WM_SetCallback(WM_HBKWIN, _cbBkWindow);
WM_SetDesktopColor(GUI_WHITE);
OS_Resume (&TCBMT);//Main Task
OS_SetPriority(&TCBDI,1); // change priority to lowest
while(1){
GUI_Exec();
GUI_X_ExecIdle();
}
}
Help - what am I doing wrong?
Lawrence
I am displaying a text box widget on the screen wihtout making it a child of another window.
No matter what I do, the text box is drawn on a black background.
I have tried the following:
- WM_SetDesktopColor(GUI_WHITE);
- TEXT_SetBkColor(hText, GUI_WHITE); (hText being the handle of the TEXT widget)
- Adding #define TEXT_DEFAULT_BK_COLOR GUI_WHITE to TEXT.h
The code creating the TEXT widget is:
void MainTask(void)
{
TEXT_Handle hText;
hText = TEXT_CreateEx(162, 40, 88, 70,0, WM_CF_SHOW, TEXT_CF_HCENTER | TEXT_CF_VCENTER, 0, "Everything you wanted to know about fruit but were too afraid to ask.");
TEXT_SetBkColor(hText, GUI_WHITE);
TEXT_SetWrapMode(hText, GUI_WRAPMODE_WORD);
while (1) {
GUI_Delay(100);
}
}
The GUI is in another task as follows
static void DisplayInit(void) {
OS_Suspend (&TCBMT);//MainTask
GUI_Init();
WM_SetCallback(WM_HBKWIN, _cbBkWindow);
WM_SetDesktopColor(GUI_WHITE);
OS_Resume (&TCBMT);//Main Task
OS_SetPriority(&TCBDI,1); // change priority to lowest
while(1){
GUI_Exec();
GUI_X_ExecIdle();
}
}
Help - what am I doing wrong?
Lawrence