Re: removeFromSuperview and mouse events
Re: removeFromSuperview and mouse events
- Subject: Re: removeFromSuperview and mouse events
- From: Alexander Spohr <email@hidden>
- Date: Thu, 9 Apr 2009 12:49:10 +0200
Try setSubviews:
Just get the subviews, sort then and setSubviews:
Documentation:
„And any views that are in both subviews and newSubviews are moved in
the subviews array as needed, without being removed and re-added.“
atze
Am 08.04.2009 um 23:26 schrieb Joshua Strickon:
I have a project in which I am adding nsbox controls as a subviews
to the main nsview. As a test, I do this on a rightmousedown. I
then use the leftmousedown to select and move the boxes around.
This all works fine. The problem I am having is that I would like
the selected object to be drawn at the top when selected. I figured
I could do this by removing it from the superview and readding it.
If I make any call to removeFromSuperview during the mousedown event
I don't any additional mousedragged or mouse up events.
I have tried retaining the subview, forcing it not to redraw and more.
What is the best way to programatically set and change subviews so
you can control the drawing order? Where are these missing events
going?
Thanks
Josh
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden