John,
As it is with many other things that I've seen with programming
for Palm OS.. It's all about timing! After the focus is set on the field,
the GfrSetState worked fine!
Thanks!
Paul
At 02:02 AM 11/19/2001 -0600, you wrote:
>On Sun, Nov 18, 2001 at 06:02:30PM -0500, Paul Taylor wrote:
> >
> > Actually, I've already tried sending both of those.. but I
> see no
> > noticeable effect.
>
>I don't think Graffiti shift strokes generate keyDown events, if this
>is what you were trying to send.
>
> > I've tried using GrfSetState(true, true, false) to get
> > it "locked" into upcase mode for a particular field, but it doesn't
> seem to
> > work at all...
>
>This is the right idea, or at least one that should work. :) Maybe you
>need to set focus to the field in question first. Here's what I do in
>one of my apps (in the event loop of the form where I want to set
>capslock), and it works fine:
>
> case frmOpenEvent:
> ...
> FrmDrawForm(form) ;
> ...
> FrmSetFocus(form,FrmGetObjectIndex(form,MyField)) ;
> ...
> capsLock = true ;
> GrfSetState(capsLock,false,false) ; /* set caps lock if entering hex */
>
> handled = true ;
>
>Note that I pass "false" for the second arg (NumLock). Also, I do
>insert text into my field between the time I set focus and the time I
>set the Graffiti state, but I don't think that matters. Lastly, don't
>forget to include a Graffiti Shift State Indicator (tGSI) resource in
>your form; I don't think it's required in order to set state, but it's
>nice to have so that the use knows what's going on.
>
>HTH,
>
>John
>
>--
>For information on using the Palm Developer Forums, or to unsubscribe,
>please see http://www.palmos.com/dev/tech/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/