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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

1,469 次查看
lpcware
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.
标签 (1)
0 项奖励
回复
1 回复

1,048 次查看
taraschornenkyy
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 项奖励
回复