Re: NSMatrix Question...Answered
Re: NSMatrix Question...Answered
- Subject: Re: NSMatrix Question...Answered
- From: Jerry LeVan <email@hidden>
- Date: Wed, 30 Jun 2004 18:17:14 -0400
This seems to be working in my case :) The definition is part of the
imagecell subclassing.
I will take a look at your app.
Thanks for the interest :)
Jerry
**************
-(void)drawInteriorWithFrame:(NSRect)frame inView:(NSView *)controlView
{
if ([self isHighlighted] || ([(NSMatrix*)controlView selectedCell]
== self) )
{
[[NSColor selectedControlColor] set];
NSRectFill (frame);
}
[super drawInteriorWithFrame:frame inView:controlView];
}
On Jun 30, 2004, at 5:57 PM, Stephen Norum wrote:
Check out my application, MPC Pad 187. You can download it here:
http://ieee.usask.ca/members/snorum/
The matrix of buttons on the left works the way you want I think. Let
me know if this is/isn't what you want.
Stephen
On Jun 30, 2004, at 3:54 PM, Jerry LeVan wrote:
What I should have written is how can I keep the cell
highlighted *after* it has been clicked.
The current highlighting is when the mouse goes up, the
cell is highlighted and then dehighlighted, just like a
regular button.
I need to keep the highlighting.
Jerry
On Jun 30, 2004, at 5:46 PM, Stephen Norum wrote:
Sorry, I misread your question the first time. Here's what I should
have written:
On Jun 29, 2004, at 9:34 PM, Jerry LeVan wrote:
I have an NSMatrix of subclassed NSImageCells. The matrix is
setup in radiobutton mode so my action will be called when
a cell is clicked.
Is there any way I can keep the selected cell highlighted when
clicking on the rascal?
You could change your NSImageCells to NSButtonCells, then by setting
up the NSMatrix as an NSRadioModeMatrix, it should handle the
highlighting for you.
In the awakeFromNib, all I do is:
[theNSMatrix setMode:NSRadioModeMatrix];
It might be less work.
Stephen Norum
email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.