----- Original Message ----- 
From: "Ornstein, Adam" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Monday, April 19, 2004 10:21 AM
Subject: RE: button pressed, screen gone


> I actually have that code already... But the problem is that even though I
> handle the button click event, the screen disappears, as if its exiting to
a
> blank screen...
>
> I was originally trying to change a labels text when the button was hit,
but
> now I have commented that code out so all the event is doing is
breaking...
> I just don't see why its exiting...  maybe that's what its default
behaviour
> is?
>

Like Tim said, you need a custom handler in this case ( FrmDoDialog ). Be
careful with the "return handled" after processing the ctlSelectEvent. If
you return false, the form will close. If you return true, the form will not
close.


Vu

>
> ------
> Use a custom event handler.  This will pass events such as penDownEvent
for
> you to handle or leave go before the system receives them.
>
> The code would look something like this:
>
>   frmP = FrmInitForm(frmDialog);
>   // initialize the form here
>   FrmSetEventHandler(frmP, &CustomFormEventHandler)
>   FrmDoDialog(frmP);
>
> Your custom event handler would have the form:
>
>   Boolean CustomFormEventHandler(EventPtr eventP) {
>     Boolean handled = false;
>     // etc...
>     return handled;
>   }
>
> Much like the main form event handler.  In this event you would have to
> capture whatever event you're interested in and process it.  Every other
> event you ignore and return false.
>
> -- 
> Tim Kostka
> http://www.nuprograms.com
>
>
>
> > Then what should I call so that I can change a labels text on the form
> with
> > a press of the button?
>
>
>
> -- 
> For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/support/forums/
>
> -- 
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
>
>



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

Reply via email to