Followup on myself with new info:

With Palm OS 3.2, I tried adding a FldGrabFocus() call after my
FrmSetFocus() call (after form activation), but that didn't cause the
displayed dialog to have a blinking cursor.  Neither did activating the form
again after the FrmSetFocus call -- making the active form active seems to
be a noop.  If I added a FrmSetActiveForm(NULL) call between where I set the
focus and where I call DoDialog, then I got the blinking cursor.  It seems
the initial focus setting mechanism on Palm OS 3.2 is tied in with a form
becoming active, which means that a Dialog should not be active prior to the
FrmDoDialog call for the controls to behave correctly.  Odd.

With Palm OS 3.5, the focus behavior seems tied with the form being
displayed rather than it being made active.  This seems more intuitive.

"Ben Combee" <[EMAIL PROTECTED]> wrote in message
news:10403@palm-dev-forum...
>
> I'm trying to figure out a quandry here.  I've got a modal dialog that I
> want to display, with the focus set on the text field when the window is
> opened.  This is my code:
>
>     // activate first dialog: SymbolLookup
>     lookupFrm = FrmInitForm(SymbolLookupForm);
>
>     FrmSetFocus(lookupFrm,
>         FrmGetObjectIndex(lookupFrm, SymbolLookupSearchTermField));
>     FrmSetActiveForm(lookupFrm);
>     hitButton = FrmDoDialog(lookupFrm);
>
> With the code like this, I get the blinking cursor when the form is
> displayed.
>
> If I transpose the two calls to FrmSetFocus and FrmSetActiveForm, such
that
> my form is made active before the set focus call, the form is displayed
with
> no blinking cursor.  However, the text field is active, and graffiti
written
> will cause characters to be inserted into the field and the cursor become
> visible.
>
> What does the act of making a form active have to do with the focused
> control?  Since the form isn't drawn until the FrmDoDialog(), why should
the
> order matter?




-- 
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