Re: Selected cell disappears in NSMatrix
Re: Selected cell disappears in NSMatrix
- Subject: Re: Selected cell disappears in NSMatrix
- From: Fritz Anderson <email@hidden>
- Date: Fri, 23 Apr 2004 12:28:44 -0500
If it is a custom cell, you have access to a debugger and the cell's
drawWithFrame:inView: method. Evidently this method is not drawing the
cell properly when the cell is highlighted. Use the debugger to see
what is happening in that case.
Is the only distinction between an NSMatrix and your matrix class that
its cell type is your custom cell? If so, it should only be necessary
to use an NSMatrix and, in your awakeFromNib method, use setCellClass:
to make the matrix use your cell. I recommend this because it gets you
what you want while protecting you from questions like this one, in
which you wonder whether it is your NSMatrix implementation that is the
problem.
-- F
On 23 Apr 2004, at 7:05 AM, email@hidden wrote:
I have subclassed NSMatrix to create a matrix made of a custom cell.
Whenever I select a cell (either programmatically or by a mouse
click), it
disappears and the deselected cell reappears. Can anyone tell me why
this is
happening?
_______________________________________________
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.