Hi, Thanks! I'll use your model and I believe that you've solved my problem.
And no, it is my fault for being imprecise in my language, but I'm not
trying to do this with a "Field" but rather with a "Label"... I guess I
sometimes think of everthing on a form as a "field," but I know that in
Palm-speak, that's wrong... Thanks again.
-don

"ThuNguyet Nguyen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> Hi Don,
>
> > I apply the same code to yet another label object on the form, and for
some
> > reason, the FrmHideObject only clears a portion of the label field,
leaving
> > garbage (the old string) in roughly the last half.  It's as if the
> > WinEraseRectangle that (I'm guessing) is done inside FrmHideObject
doesn't
> > see the entire length of the field.
> >
> I did use FrmHideObject() when I wanted to change the text in the label
but I don't use it
> anymore, I read something about it & I had the same problem as you have.
So, now, I use
>
> // some code to make sure that labelText is shorter than
> // the original string in the label (or cut it)
> // ...
>       FrmGetObjectBounds(frmP,objIndex, &r);
>       WinEraseRectangle(&r, 0);
>       FrmCopyLabel(frmP,objID,labelText);
>
> This code works every time for me (different OS version)
>
> > I'd do the WinEraseRectangle, but how do I know the
> > real, current, area of the field?
> >
> When you mention "field", I don't know if you still talk about label or
you also talk about text
> field. I use SetTextField(), GetTextField(), FreeTextField() to manipulate
text fields. These
> functions are mentioned a lot in Palm books, in this forum and I can send
you my code if you want.
>
> HTH,
>
> tnn
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
> http://calendar.yahoo.com
>
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to