Pick Range

PickRange method usage:

PickRange( Func<...,bool> handler, Cursor )

where handler is an anonymous function that is called when range picked by user.

Return true from this handler if range is expected. Return false to continue pick range.

Cursor is the cursor displayed when user picking range. Cursor will be restored to default after operation is terminate.

e.g.:

grid.PickRange((inst, range) =>
{
  MessageBox.Show("User picked range: " + range.ToString());
  return true;
}, Cursors.Hand);

Pick a range