Seeking wisdom: Control overlayed on top of NSTableView
Seeking wisdom: Control overlayed on top of NSTableView
- Subject: Seeking wisdom: Control overlayed on top of NSTableView
- From: James Bucanek <email@hidden>
- Date: Thu, 26 May 2005 09:07:15 -0700
Greetings,
I need to overlay a rectangular "selection" control over an NSTableView. (Think of the semi-transparent cropping/selection box used when editing pictures in iPhoto)
Thinking about the problem, it would seem that there are two obvious ways of implementing this:
1) Subclass NSTableView, let the superclass do most of it's regular drawing, then draw the selection control on top of that. Intercept the various events to handle movement, etc.
2) Create my own (semi-transparent) NSControl object and position it right on top of the NSTableView.
Of the two, #2 sounds the easiest but I'm worried about keeping the two NSViews lined up and I'm worried about all of the coordinate transformations that are going to be required (since the NSTableView is inside an NSScrollView).
Has anyone done something similar to this, and would you care to share any advice or wisdom on the subject?
--
James Bucanek <mailto:email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden