Changes between Version 1 and Version 2 of Docs/Prog/Manual/ApplicationLibraries/lib825ev/Form/SetKeyEvent


Ignore:
Timestamp:
06/27/19 08:52:48 (5 years ago)
Author:
Don Wilson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Docs/Prog/Manual/ApplicationLibraries/lib825ev/Form/SetKeyEvent

    v1 v2  
    2121}}}
    2222
     23int DontAllowZKey(CForm* pForm CFormItem* pItem, int nData)
     24{
     25   if(nData == 'Z')
     26      return 0;
     27   else
     28      return nData;
     29}
     30
     31void CreateNoZForm(void)
     32{
     33    FORM_INIT(NoZ, EventNoZShow, NULL, NULL, NULL, nFormFlgNone);
     34
     35    FORM_ADD_INPUT(NoZ, ID, FONT_WIDTH * 2, FONT_HEIGHT * 3, "Input: ", 10, 0, 0, NULL, g_strID, NULL, "Enter ID, 'Z' not allowed");
     36
     37    formNoZ.SetKeyEvent(DontAllowZKey);
     38
     39    FORM_SHOW(NoZ);
     40    FORM_RUN(NoZ);
     41    FORM_HID(NoZ);
     42
     43
     44}
     45
    2346{{{
    2447}}}