Perhaps you can also add a read-only Rect property?
I was also thinking about how nice it would be to have the rect
intersect etc. functions on the window level as something like this:
def intersectsChildren(object, includeSelf=False):
for child in self.Children:
if not includeSelf and child is object: continue
if child.Rect.Intersects(object.Rect):
return True
return False
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Ed Leafe
Sent: 12. juli 2007 14:25
To: Dabo Users list
Subject: Re: [dabo-users] Text DrawObject.Width
On Jul 12, 2007, at 4:06 AM, Simen Haugen wrote:
> DrawObject has a Width property. On bmp's it work, but on text I
> need to
> do:
>
> txt = self.drawText("the text")
>
> # txt.Width is 0
>
> width = dabo.ui.fontMetricFromDrawObject(txt)[0]
OK, that sounds reasonable, but bear in mind that it would be
read-
only. Height and Width were only originally intended to be used with
objects where those dimensions needed to be specified.
-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/dabo-users/[EMAIL PROTECTED]