Getting NSTableView to behave like a spreadsheet
Getting NSTableView to behave like a spreadsheet
- Subject: Getting NSTableView to behave like a spreadsheet
- From: Scott Osborne <email@hidden>
- Date: Fri, 14 Sep 2001 10:53:59 +1200
I am writing an application that requires simple spreadsheet behavier. The
size of the sheet is fixed which makes things a little simpler.
I know how to change the appearance of special cells in the sheet (using
tableView:willDisplayCell ...)
My main problem is being able to cut/copy and paste rectangular selections
of cells which cross several columns or rows (and don't neccessarily include
the entire column/row).
Does anyone have any ideas or examples of getting an NSTableView object to
behave like a spreadsheet for cut paste operations?
Also getting gridlines to be drawn reliably seems to be impossible. Setting
the 'Show Grid' option in IB does not result in grid lines been drawn at
all. The only way I have been able to get grid lines to be drawn is to
deselect the 'Show Grid' option in PB and use the setDrawsGrid:YES method in
from PB (called from windowDidLoad). Only problem with this is that if you
scroll through the tableview too quickly the grid lines are not drawn.
I am using a G4 450DP (640MB RAM) so I wouldn't have thought speed should be
a problem.
Any ideas here. Am I forgetting to do something?
Scott