frm is a pointer to the current form.  (In your case it's probably frmP)  I
just took the example I posted from some code I wrote a while back.

And no, it's not the same code.  If you look, you're drawing the form AFTER
you set the focus.  What you need to do is Draw the form BEFORE you set the
focus.

Basically, the concept is that you can't set the focus to something that
isn't drawn, capice?

Catch ya on the flipside.

--

Tim Astle




Owen Butler <[EMAIL PROTECTED]> wrote in message
news:8612@palm-dev-forum...
>
> Hello,
>
> > 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;
>
> Does this compile and run on your machine?
>
> The line
>
> >      FrmSetFocus(frmP, FrmGetObjectIndex(frm, MainResult1Field));
>                                            ^^^
> contains a variable I dont know about...  Is that a typo and meant to be
> frmP?  If so, its the same as the code I posted.
>
> It still doesn't seem to work.
>
> Any ideas?
>
>
> Owen Butler
> > Owen Butler <[EMAIL PROTECTED]> wrote in message
> > > 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