1 Reply Latest reply: Sep 8, 2011 12:06 AM by AidySun RSS

    Event Handler for the Combo Box

    Praveen M. Community Member

      Hi,

       

      I have TextComboBoxWidget, I want to trap the return key event. For each key press the update function in Observer get exectued but I found the difference in only ClassID when the focus is lost,

       

      I tried to write the event handler,

      code in  .fr file is as

      Class
          {
              kMyComboBoxWidgetBoss,
              kTextComboBoxWidgetBoss,
              {
                  IID_IEVENTHANDLER,  kMyComboBoxEHImpl,
                  IID_IMYCOMBOEVENTHANDLER,  kComboBoxEventHandlerImpl ,
              }
          },

      type MyTextComboBoxWidget(kViewRsrcType) : TextComboBoxWidget(ClassID = kMyComboBoxWidgetBoss){};

       

      In factory.h the class is registered.

       

      And kMyComboBoxEHImpl is inherited from the CEventHandler, as

      class EditBoxEH2 : public CEventHandler

       

      but, when I press any then the control is not comming in the constructor of the event handler, I am not getting what's going wrong?  Please help.

       

      Thanks,

      Praveen