"Dave Lippincott" <[EMAIL PROTECTED]> writes:

> The character pointer you pass using FldSEtTextPtr needs to be a pointer,
> not a constant text string.  

This is not true. A constant text string is a pointer, and would work just
fine in this situation.

> Plus, the pointer needs to remain in scope for the life of the field
> you wish alter.

This is true, but a constant text string would remain in scope (i.e.,
it's not on the stack).

There are other reasons for not using a constant text string, such as
I18N.

> you could try (and I believe this is in the KB)
> 1) get the field pointer
> 2) get the size of the string you want to update the field with
> 3) get the field text handle
> 4) allocate memory or resize the handle if necessary
> 5) lock the handle
> 6) COPY the new string to the locked handle
> 7) unlock the handle
> 8) redraw the field

This is way too complicated for setting a non-editable field. As another
poster pointed out, multiple line, read-only fields won't draw correctly
unless you call FldRecalculateField after setting the pointer.

-- 
Dave Carrigan ([EMAIL PROTECTED])            | Yow! Xerox your lunch and file
UNIX-Apache-Perl-Linux-Firewalls-LDAP-C-DNS | it under ``sex offenders!''
Seattle, WA, USA                            | 
http://www.rudedog.org/                     | 

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