Re: How to get length of contents
- From: Ron Benditt <rbenditt@xxxxxxxxxxxxxxxxxx>
- To: ftcdev@xxxxxxxxxxxxx
- Date: Fri, 13 Feb 2009 07:39:12 -0800
> Go back into the January FTC archive and read the thread entitled,
> "Using the FTC as an editor, then drawing rendered text". It has
> the basics of what you need to do.
Yes, I've done some of that...
I tried your suggestion of using ftc.getDisplayPicture to get a
picture and then grabbing its height.
That doesn't give me what I need. The height is all wrong.
I've also tried your suggestion of:
p=ftc.getDoc.getParagraph(ftc.getDoc.getParagraphCount- 1)
theNewFTCHeight = p.getProxyItem(0).getComposePosition +
p.getHeight(true) + ftc.BottomMargin
That's not doing it either. This seems like it should be a really
simple thing to do. I've been banging my head against the wall over
it all night.
Thanks,
Ron Benditt
Alien Apparatus Company, Inc.
http://www.alienapparatus.com
On Feb 13, 2009, at 7:04 AM, Brendan Murphy wrote:
> Ron Benditt wrote:
>> I'm trying to make a FTC edit field that resizes its height to match
>> the height of its contents. I'm having a bit of trouble finding a
>> way
>> to get the height to set the FTC to. The only method call that I've
>> found that gets me close is ftc.getDoc.getPageHeightLength. This
>> works some of the time, but not always. Perhaps because I'm using
>> the
>> FTC as and edit field I shouldn't be messing with the page
>> properties? Is there something else that I can query to get what I
>> need? Or even a 'line count' would work...
>
> FTC Website:
> http://www.truenorthsoftware.com/FormattedTextControl/FormattedTextControl.html
> Set List Options (digest and vacation modes): www.freelists.org/list/ftcdev
> List Archive: www.freelists.org/archives/ftcdev
> Unsubscribe: Send email to ftcdev-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject field.
>
>
>
FTC Website:
http://www.truenorthsoftware.com/FormattedTextControl/FormattedTextControl.html
Set List Options (digest and vacation modes): www.freelists.org/list/ftcdev
List Archive: www.freelists.org/archives/ftcdev
Unsubscribe: Send email to ftcdev-request@xxxxxxxxxxxxx with "unsubscribe" in
the subject field.
Other related posts: