On 22 May 2006, at 21:09, Dan Winkler wrote:
> Our application uses a custom layout manager for sizing dialog items
> etc. I've been searching the lists for different ways of calculating
> the size needed to display text using static text control. I seems that
> the following does not give the correct size for the text. Is there
> another function which can be used to calculate the space needed for
> specific text using a static text control? If I use the dimensions
> returned from the following call to size the control, the text is
> clipped.
>
> Point ptPoint = { 0, 0 };
>
> SInt16 wBaseline = 0;
>
> ::GetThemeTextDimensions( strText, kThemeSystemFont,
> kThemeStateActive, false, &ptPoint, &wBaseline );
Could it be the case that you just pass wrong font constant here?
E.g. the control uses kThemeEmphasizedSystemFont, etc. If that's
not the case and you have a reproducible one page app that shows
this issue I'd like to look at it.
Mike
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden
This email sent to email@hidden