Using a label is feasible but dangerous because the new field MUST NOT
exceed the length of the original field you created the label with.

To avoid repeating the chunk of code to write to a field, create a function
with that code, and then just call that function with the form ID, field ID
and a pointer to the text. 

(C programming 101: whenever you find yourself repeating a set of code, put
it in a function and call that function instead!)

Roger Stringer
Marietta Systems, Inc.

>Date: 28 Sep 1999 12:04:24 -0700
>From: "Matt West" <[EMAIL PROTECTED]>
>Subject: Displaying text: Label or Non-editable field?

>Hi. I usually just lurk here, listening to everyone. But here goes...

>I'd like to display some text programmatically. In the Rhodes and McKeehan
>book, they suggest it may be better to use a non-editable field rather than
>a label. Does anyone have an opinion on this?

>Most of the source code I've seen deals with Editable fields. Could someone
>please point me in the direction of a good source code example. It just
>seems that all that locking/unlocking of text handles is lots of work,
>whereas using labels and the FrmCopyLabel routine looks a bit more graceful.
>Or is it?. Of course I'll use fields if I have to :)


Reply via email to