On Aug 4, 2013, at 9:59 AM, Mills, Steve wrote:

> On Aug 4, 2013, at 9:45, "Nick Rogers" <roger...@mac.com> 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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to