FROM : Andreas Mayer
DATE : Wed Apr 04 04:57:39 2007
Am 03.04.2007 um 22:28 Uhr schrieb Roland Torres:
> Now I need to color the cells by clicking and dragging the mouse
> over them
I'm not sure NSMatrix is the right choice here. Maybe you should
create your own custom view. You can then handle all mouse events any
way you like. It shouldn't be too much work, since you can keep your
cells to do the drawing.
> Is there some way to know, when an NSCell's -drawWithFrame:inView:
> method gets invoked, that it's in a mouseDown event?
Set a flag in the view on -mouseDown: and check it from the cell's
drawing code.
Andreas
DATE : Wed Apr 04 04:57:39 2007
Am 03.04.2007 um 22:28 Uhr schrieb Roland Torres:
> Now I need to color the cells by clicking and dragging the mouse
> over them
I'm not sure NSMatrix is the right choice here. Maybe you should
create your own custom view. You can then handle all mouse events any
way you like. It shouldn't be too much work, since you can keep your
cells to do the drawing.
> Is there some way to know, when an NSCell's -drawWithFrame:inView:
> method gets invoked, that it's in a mouseDown event?
Set a flag in the view on -mouseDown: and check it from the cell's
drawing code.
Andreas
| Related mails | Author | Date |
|---|---|---|
| Roland Torres | Apr 3, 22:28 | |
| Andreas Mayer | Apr 4, 04:57 |






Cocoa mail archive

