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?
On a related question... do I always need to turn on the "save bits" flag
for sub-screen modal dialogs like this? I noticed on my 3.2 ROM that if
that bit was off, the modal form was drawn without erasing its background,
and when it was dismissed, the reactivated form underneath it was not
redrawn.
Thanks!
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/