On Mon, 2004-01-26 at 08:42, Steve Wampler wrote:
> On Mon, Jan 26, 2004 at 08:29:58AM -0700, Steve Wampler wrote:
> > 
> > Does anyone have any code for figuring out the 'size' (x,y bounds)
> > of a string before it is displayed in a component?
> 
> Ah, reading the "Graphics Programming in Icon", I've found
> the WAttrib("ascent"), WAttrib("descent"), and WAttrib("leading")
> calls.  That should be sufficent, along with TextWidth() to
> do the above.

Ok, apparently I lied.  Nothing is easy, even
after finding WAttrib(w, "height") and 
WAttrib(w, "leading")...

TextWidth() and WAttrib() require the window as
a parameter - but apparently there is no window
associated with a _Dialog while it is being setup()
(window value is &null), so I can't get use the
above after all...

Now, I *think* I can get around this by estimating
the width using the 'width' (maximum character width)
of the font, but how do I get the font during
_Dialog setup()?

Is there another way?

Thanks!
Steve
-- 
Steve Wampler <[EMAIL PROTECTED]>


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Unicon-group mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unicon-group

Reply via email to