Cursor blinking is not working in Edit Widget of emWIN with LPC1788 platform

cancel
Showing results for 
Search instead for 
Did you mean: 

Cursor blinking is not working in Edit Widget of emWIN with LPC1788 platform

468 Views
NXP Employee
NXP Employee
Content originally posted in LPCWare by Dnyaneshwar.Kashid@Honeywell.com on Fri Jul 03 01:09:02 MST 2015
I am using emWin 5.22 on LPC1788 platform. On Edit widget, cursor blinking is not working.  Initially for two seconds cursor blinks & then it disappears. I am regularly calling GUI_Delay function in main loop. Please find below the code snippet.

hEdit = EDIT_CreateEx ((CHECKBOX2_START_X + alignment), (title_size_Y+(space*i)-(CHECKBOX2_SIZE_Y/2)), CHECKBOX2_SIZE_X, CHECKBOX2_SIZE_Y, WM_HBKWIN, WM_CF_SHOW , 0, ID_CHECKBOX_1, (int)((c_data 
+i)->no_digits));

WM_SetTransState(hEdit,WM_CF_HASTRANS);
EDIT_SetInsertMode(hEdit, 1);
EDIT_SetBkColor (hEdit, EDIT_CI_DISABLED , GUI_GRAY);
EDIT_SetBkColor (hEdit, EDIT_CI_ENABLED , GUI_WHITE);
EDIT_SetFont (hEdit, &GUI_FontTahoma28_Regular);
EDIT_SetTextColor(hEdit,EDIT_CI_ENABLED ,GUI_BLACK);
EDIT_EnableBlink(hEdit, 500, 1); EDIT_SetCursorAtChar(hEdit, 1); EDIT_SetFloatMode(hEdit, flt_Val, min_val, max_val, 1, GUI_EDIT_NORMAL | GUI_EDIT_SUPPRESS_LEADING_ZEROES);
EDIT_SetCursorAtChar(hEdit, 1);
EDIT_SetFloatMode(hEdit], *(float*)load_data->Value, *(float*)load_data->limit_min, *(float*)load_data->limit_max, 1, GUI_EDIT_NORMAL | GUI_EDIT_SUPPRESS_LEADING_ZEROES);
WM_SetFocus(hEdit);

I would like to know whether I am missing any settings or functions which cause cursor not to blink.
Labels (1)
0 Kudos
1 Reply

47 Views
Contributor I

Hello!

Your code seems to be right.

Since cursor blinks for two seconds I assume, that Edit was initialized properly.

Disappearing of the cursor after two seconds is interesting. Do you have any timers or events that occurs in two seconds after window initialization? It might cause such problems.

0 Kudos