If that is the case, is there anyway I can get rid of the penDownEvent
before I enable the cntrol again? Or any suggestion what I should do?
(Sorry, I am new to Palm programming).
Thanks alot.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Ben
Combee
Sent: Wednesday, December 20, 2000 8:15 AM
To: Palm Developer Forum
Subject: Re: Unable to disable a control button
"Jacky Cheung" <[EMAIL PROTECTED]> wrote in message
news:33462@palm-dev-forum...
>
> I tried to disable a control button by using
>
> CtlSetEnabled( ...., false);
> Myfunction();
> CtlSetEnabled( ....., true);
>
> but when I press the button during the execution of Myfunction(), the
system
> still respond to the button I pressed during that time after Myfunction()
> has finished.
> Any idea?
Is there an event loop active during Myfunction()? If not, then your
penDownEvent isn't being handled until after you return from MyFunction and
call CtlSetEnabled(), so when the event loop is entered, your control is
enabled again.
--
Ben Combee
Veriprise Wireless <http://www.veriprise.com>
--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/