Getting the textheight

2000-02-26 Thread Raymond E. Griffith

Just a question about what ought to be a simple thing, but I seem to be
missing the obvious.

I am working with a field. I would like to make the font size resizable for
the user's visual comfort.

Certain functions related to data selection and input require the textHeight
of the field. 

I created a field and tried to get the textHeight. The textHeight returned
empty. I checked the font information. The information was empty -- which
means that the text settings should be the same as the text settings for
MetaCard (Helvetica 14).

When I set the font information to something other than the default
settings, (say, size = 13) I get the information (textheight = 17) . Setting
the font information back to the default settings (Helvetica 14), the
textheight returns empty.

I then repeated the experiment with the textfont. Same results.

Ok, then. It seems that for any field that has the default text
characteristics (whether set at MetaCard's level, the stack's level, or the
card's level), querying for those characteristics returns empty. Is there
any easy way to obtain those characteristics via script?

Or, as is so often the case, am I missing the obvious?

Thanks,

Raymond



This is the MetaCard mailing list.
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm



Re: Getting the textheight

2000-02-26 Thread Raymond E. Griffith

 "Raymond E. Griffith" wrote:
 
 Just a question about what ought to be a simple thing, but I seem to be
 missing the obvious.
 
 I am working with a field. I would like to make the font size resizable for
 the user's visual comfort.
 
 Certain functions related to data selection and input require the textHeight
 of the field.
 
 I created a field and tried to get the textHeight. The textHeight returned
 empty. I checked the font information. The information was empty -- which
 means that the text settings should be the same as the text settings for
 MetaCard (Helvetica 14).
 
 When I set the font information to something other than the default
 settings, (say, size = 13) I get the information (textheight = 17) . Setting
 the font information back to the default settings (Helvetica 14), the
 textheight returns empty.
 
 I then repeated the experiment with the textfont. Same results.
 
 Ok, then. It seems that for any field that has the default text
 characteristics (whether set at MetaCard's level, the stack's level, or the
 card's level), querying for those characteristics returns empty. Is there
 any easy way to obtain those characteristics via script?
 
 Or, as is so often the case, am I missing the obvious?
 
 Thanks,
 
 Phil Davis [EMAIL PROTECTED] answered
 
 Please pardon the terse response - gotta go.
 Things to be aware of:
 - text properties of the field vs. text props of the selectedText
 - the effective textHeight vs. the textHeight (same for other text
 props)
 - the fixedLineHeight of the field
 
 FWIW - explore!
 Phil

Phil, many thanks! The effective textHeight did the trick -- I will explore
the other ideas as well. Again, thanks!

Raymond



This is the MetaCard mailing list.
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm