[ROOT] Event Generation in TGNumberEntry

From: Glen R. Salo (gsalo@mrcstl.com)
Date: Sat Sep 22 2001 - 01:21:05 MEST


Hi Everyone,

TGNumberEntry is not working as I expect.  The event generated by the
TGNumberEntry always returns 3 rather the the widget id.  To test this
out, replace the EntryTestDlg::ProcessMessage method in guitest.cxx with
the code sample below and edit any of the TGNumberEntry widgets.  parm1 is
always 3.  I don't think this is correct.

Thanks,

Glen

PS  I am running the latest CVS development as of today on a RedHat 7.1 PC.

Bool_t EntryTestDlg::ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
{
   switch (GET_MSG(msg)) {
   case kC_TEXTENTRY:
     {
       switch(GET_SUBMSG(msg)) {
       case kTE_TEXTCHANGED:
       case kTE_ENTER:
       case kTE_TAB:
         printf("parm1 = %ld, parm2 = %ld\n",parm1,parm2);
         break;
       }

     }
     break;
   case kC_COMMAND:
      {
         switch (GET_SUBMSG(msg)) {
         case kCM_BUTTON:
            {
               switch (parm1) {
                  // exit button
               case 1:
                  {
                     CloseWindow();
                     break;
                  }
                  // set button
               case 2:
                  {
                     SetLimits();
                     break;
                  }
               }
               break;
            }
         }
         break;
      }
   }
   return kTRUE;
}



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:00 MET