"Evan Wise" <[EMAIL PROTECTED]> wrote in message
news:66031@palm-dev-forum...
>
> Hey all,
>
> an interesting problem that I fixed but am curious to the know why
occured
> in the first place.
>
> I have a textfield in a table in a dialog that I popup via
FrmDoDialog.
> Previously I was attempting to setup the focus for the table before I
called
> the FrmDoDialog, which worked fine; however, on return to the calling
form
> the focus was blinking on a push button!
> I got around the problem by implementing my event handler for the
dialog and
> setting focus in there, but I am curious how a push button could get
the
> focus (by which I mean the blinking cursor appeared in the push
button).

In the code that handles your modal dialog, call FrmDrawForm on the
modal form after you do the FrmInitForm.  Then set the focus, and
finally call FrmDoDialog.  You cannot reliably set focus before a form
is drawn, but you can always draw a dialog before you enter the modal
loop (FrmDoDialog won't redraw it if its already visible).



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

Reply via email to