Actually... I'm assuming that the FrmSetFocus(frmP, FrmGetObjectIndex(frmP,
MainResult1Field));
you are using is being called in the Init Form.

If you're not calling it there, it should would.  It would be better syntax
to leave handled=true; at the bottom of your case before the break;

Either way, let me know if you get it working.  If not, just e-mail me and
I'll see what else I can do.  It's quite simple, so it won't be hard to get
working.

--

Tim Astle



Owen Butler <[EMAIL PROTECTED]> wrote in message
news:8470@palm-dev-forum...
>
> Hello,
>
> Im trying to set the focus to a text entry field in my program,
>
> I was under the impression that
>
>     FormPtr frm = FrmGetActiveForm();
>     FrmSetFocus(frm, FrmGetObjectIndex(frm, MainResult1Field));
>
> would do the trick... but i've had no success in my program.
>
> I've tried calling FrmSetFocus in my main forms init function, and
directly
> after recieving the frmOpenEvent event.
>
> file://example
> case frmOpenEvent:
> frmP = FrmGetActiveForm();
> MainFormInit( frmP);
> FrmDrawForm ( frmP);
> handled = true;
>
>
>             FrmSetFocus(frmP, FrmGetObjectIndex(frmP, MainResult1Field));
> // end example
>
>
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to