How would you implement a selection marquee?

Hello,

On a single view, with no scrolling, it is possible to :

  • get the mouse down event in local coordinates
  • track the mouse while mouse is down and draw a selection rect (a simple black outline) from the start point to the mouse
  • get the rect local coordinates at mouse up and put of the marquee?

Is there a Cocoa class who can do this for me or have I to code this the old style ?

Worst of all, the view is a NSMatrix of empty cells – and the selection does not work on empty cells :wink:

Regards,