FROM : I. Savant
DATE : Fri Aug 11 17:21:19 2006
You could subclass NSMatrix and make it aware of the chosen color.
When your cell's -highlightColorWithFrame... method is called, ask
the "controlView" (which should be your subclassed NSMatrix) for the
right color and use it as needed.
--
I.S.
On Aug 11, 2006, at 10:13 AM, Aaron Kobayashi wrote:
> Hi everyone,
>
> I'm overriding
>
> - (NSColor *)highlightColorWithFrame:(NSRect)cellFrame inView:
> (NSView *)controlView
>
> in a subclass of NSTextFieldCell which is contained in an NSMatrix
> to change the highlight color. This works stupendously. With the
> machinery in place, I need to find a way to pipe data in to the
> routine to make a decision on the color to highlight with.
>
> Essentially, I want to detect a mouse down on the matrix and store
> a color. Until mouse up, I want the highlightColorWithFrame
> routine to return the color picked in the mouse down routine. This
> seems like a trivial thing to do, but I haven't been able to find a
> way to pipe data into this method.
>
> Any suggestions? Certainly other people have dealt with a similar
> problem.
>
> Thanks,
> Aaron K.
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list (<email_removed>)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/idiotsavant2005%
> 40gmail.com
>
> This email sent to <email_removed>
DATE : Fri Aug 11 17:21:19 2006
You could subclass NSMatrix and make it aware of the chosen color.
When your cell's -highlightColorWithFrame... method is called, ask
the "controlView" (which should be your subclassed NSMatrix) for the
right color and use it as needed.
--
I.S.
On Aug 11, 2006, at 10:13 AM, Aaron Kobayashi wrote:
> Hi everyone,
>
> I'm overriding
>
> - (NSColor *)highlightColorWithFrame:(NSRect)cellFrame inView:
> (NSView *)controlView
>
> in a subclass of NSTextFieldCell which is contained in an NSMatrix
> to change the highlight color. This works stupendously. With the
> machinery in place, I need to find a way to pipe data in to the
> routine to make a decision on the color to highlight with.
>
> Essentially, I want to detect a mouse down on the matrix and store
> a color. Until mouse up, I want the highlightColorWithFrame
> routine to return the color picked in the mouse down routine. This
> seems like a trivial thing to do, but I haven't been able to find a
> way to pipe data into this method.
>
> Any suggestions? Certainly other people have dealt with a similar
> problem.
>
> Thanks,
> Aaron K.
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list (<email_removed>)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/idiotsavant2005%
> 40gmail.com
>
> This email sent to <email_removed>
| Related mails | Author | Date |
|---|---|---|
| Aaron Kobayashi | Aug 11, 16:13 | |
| I. Savant | Aug 11, 17:21 | |
| Aaron Kobayashi | Aug 11, 17:46 |






Cocoa mail archive

