On Mar 1, 2006, at 3:30 PM, realbasic-nug- [EMAIL PROTECTED] wrote:


Message: 16
Subject: Moving RectControl with Window
From: Thom McGrath <[EMAIL PROTECTED]>
Date: Wed, 1 Mar 2006 15:00:51 -0500

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?



The only control that does not listen to locks is indeed the RectControl. In RB versions prior to 5.5.5 it was almost impossible to set a RectControl on the window, and the general consensus was to not use RectControl, but use a Canvas.

Having said that, we do have exploited RectControl in a plugin, and use it as our template base. For you to resize it, you will need to implement the Window.resize and resized events in order for it to move it. If you have a ContainerControl, you can use its Move, Resize and Resized events.

To make it easier for you: use either a caanvas or a containerControl, they do the same things as a RectControl. However, RectControl has a CreatePane event, which no other control or window defines. And that event might be very important for you, I guess.

Well, we use in our plugin a RecControl as parent to a canvas and two sliders and exploit the different behaviors of RectControl and Canvas to the fullest extent possible, but that is another story....

Alfred
_______________________________________________
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>

Reply via email to