At 12:00am -0700 00-08-08, Palm Developer Forum digest wrote: >Subject: Calculating text..... >From: Ralph Krausse <[EMAIL PROTECTED]> >Date: Mon, 7 Aug 2000 11:19:21 -0400 >X-Message-Number: 9 > >Hello all... > > I have a field control with text in it. I takes up 3 of the 4 lines. >Is there a way I can get the 'n'th line of text. IE, I need to get the 2nd >or 3rd line of text in that field control. > >TIA! >Ralph Krausse I assume you're talking about a field object, and not the text in a control label, right? There's no public API to return back this information. Your two options are: a. Wrap the field text yourself, calling FntWordWrap. This is somewhat slow, but avoids directly using field data structure elements. On the other hand you wind up making the implicit assumption that the field code also calls FntWordWrap with the width of the field object. b. Use the information in the FieldType.lines array of LineInfoType records. Note that the FieldType.lines pointer might be NULL, for a single line field or a field with no text in it. -- Ken Ken Krugler TransPac Software, Inc. <http://www.transpac.com> +1 530-470-9200 -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
