--- Paul Gibson <[EMAIL PROTECTED]> wrote:
> 
> When I have a button that switches forms (say formA to formB), 
> and formA event handler returns a 0 (event not handled to allow 
> button to highlight and unhighlight) I get an error 
> ...
> <from formA event handler>
> case ctlSelect:
> {
>       cid = e->data.ctlEnter.controlID;
>       if(cid == SwitchFormBtn)
>       {
>               FrmGotoForm(formB);
>               gCurrentView = formB;
>               handled = 0;
>       }
>       break;
> }
> return handled;

??? I don't think this is your actual code.  "ctlSelect" is a member of
the EventType struct.  I think you meant "ctlSelectEvent".

Your app should respond to ctlSelectEvent, and then return true.  For
example:

  case ctlSelectEvent:
    if ( e->data.ctlSelect.controlID == SwitchFormBtn )
    {
      FrmGotoForm( formB );
      gCurrentView = formB;
      handled = true;
    }
    break;
  // ...
  return handled;

Your app will receive the ctlSelectEvent *after* the button has been
tapped and the pen has been lifted while still within the bounds of the
button.  The button will be hightlighted when you tap it, and it will
be unhighlighted if you slide the stylus off the button before lifting
it up -- in this case, you will not receive a ctlSelectEvent.  If you
call FrmGotoForm() in response to the ctlSelectEvent, I believe that
the button will be unhighlighted, but you probably won't see it happen
because the form will be gone.


__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to