On Mar 1, 2006, at 3:00 PM, Thom McGrath wrote:
I'm subclassing RectControl (because of the standard mouse events &
such) and need to know when it is moved. There doesn't appear to be
any Resized or Moved events, so how do I know when it has been moved?
I have tried overriding the various positioning properties, such as
Left, with a computed property. This works great when moving
programmatically, but they don't get set while to window is resizing
with Lock* properties enabled on it. It also crashes the app (unexpect
quit) when I try to get or set super.left, which is another major
problem.
Can somebody help me find a way?
I subclass Canvas. To that subclass I add private properties OldWidth
as Integer, OldHeight as Integer. Then I implement Paint as follows,
If oldWidth <> g.Width or oldHeight <> g.Height then
Resized //my event
oldWidth = g.Width
oldHeight = g.Height
End if
What I really do is a little more complicated, but perhaps you get the
idea.
--------------
Charles Yeomans
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>