Re: drawing outside the dirtyRect (of a NSView sub class) and overlapping NSTableView
Re: drawing outside the dirtyRect (of a NSView sub class) and overlapping NSTableView
- Subject: Re: drawing outside the dirtyRect (of a NSView sub class) and overlapping NSTableView
- From: Ken Thomases <email@hidden>
- Date: Sun, 04 Aug 2013 12:56:06 -0500
On Aug 4, 2013, at 9:59 AM, Mills, Steve wrote:
> On Aug 4, 2013, at 9:45, "Nick Rogers" <email@hidden> wrote:
>
>> I have a column of buttons stacked up one over the other and on clicking a button I want to draw an image on it with an arrow protruding to the right. And on the right side there is a tab view and in it there is a table view.
>> So the arrow part of the image must overlap the tab view and table view and the table view is required to have normal behaviour even after this.
>>
>> Is this even possible?
>
> Create a view subclass that will draw the arrow on top. Embed the other views inside it.
I don't think that will work because the containing view will draw behind the contained views.
You can try making a view that's a sibling of both the button and the tab view and ordered on top of both.
Another approach would be to make a mostly-transparent overlay window to draw the arrow. Make sure it ignores mouse events so clicks on the opaque parts go through. Set it as a child window of the window containing the buttons and tab view, so it moves with it. If the underlying window is resizable or changes its layout, you'll need to take care to keep the position of the arrow synchronized with the other controls. (That's true of any approach you take, of course.)
Regards,
Ken
_______________________________________________
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