Depends if you want to initialize something before the form is drawn or not.
It might almost make sense to have another function called after the form is
drawn... especially if more stuff is being done after the Form is drawn.
--
Tim Astle
Jason Simpkins <[EMAIL PROTECTED]> wrote in message
news:8530@palm-dev-forum...
>
> If you use FrmGotoForm() do you still need to do a MainFormInit()?
>
> Jason
> ----- Original Message -----
> From: "Tim Astle" <[EMAIL PROTECTED]>
> Newsgroups: palm-dev-forum
> To: "Palm Developer Forum" <[EMAIL PROTECTED]>
> Sent: Monday, April 17, 2000 5:15 AM
> Subject: Re: setting field focus
>
>
> > I bet you're gonna kick yourself after I show you this one :-)
> >
> > case frmOpenEvent:
> > frmP = FrmGetActiveForm();
> > MainFormInit( frmP);
> > FrmDrawForm ( frmP);
> > // Set the focus AFTER you draw your form
> > FrmSetFocus(frmP, FrmGetObjectIndex(frm, MainResult1Field));
> > handled = true;
> >
> > Ciao!
> >
> > --
> >
> > 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
> >
> >
>
>
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html