Re: Tableviews like Excel ones
Re: Tableviews like Excel ones
- Subject: Re: Tableviews like Excel ones
- From: Ryan Britton <email@hidden>
- Date: Tue, 30 Aug 2005 18:48:42 -0700
In my case, I did a complete custom view. There were three main
components to it: WorksheetCell, Worksheet, and Spreadsheet.
Worksheet was much like NSTableView is in that it was composed of an
actual content view in a wrapper scroll view that provided "rulers"
for both horizontal and vertical that acted as the row and column
markers (here is where NSTableView would be a pain because it does
not provide row markers).
I no longer have that code or I'd be willing to provide something for
an example though. I do have a few warnings though:
- Cocoa text drawing is very costly when you have large numbers of
cells, even when being smart about the region updated. I ended up
having to go directly to ATSUI in order to achieve acceptable text
drawing speeds.
- Ditto for Cocoa drawing. I used the CG* functions directly instead
and pre-rendered images where I could get away with it.
Here are a few of the early rendering pictures if you're curious:
http://www.vector-inc.com/images/spreadsheet.png
http://www.vector-inc.com/images/spreadsheet2.png
http://www.vector-inc.com/images/spreadsheet3.png
http://www.vector-inc.com/images/spreadsheet4.png
On Aug 30, 2005, at 5:39 PM, Manfred Bergmann wrote:
Am 31.08.2005 um 10:27 schrieb Ryan Britton:
NSMatrix as it stands is not a good choice for this unless you
subclass and override some stuff. I've tried it for exactly this
purpose and its behaviors do not coincide with spreadsheet
behaviors. For one, NSMatrix allows non-contiguous selections
where a normal spreadsheet does not. NSMatrix also has some
oddities when it comes to cell size. I found it easier to write a
custom class that did only what I needed.
Did you implement a complete custom class or a subclass of
NSTableView?
cya,
Manfred
On Aug 30, 2005, at 3:24 PM, Sanri Parov wrote:
On Wed, 31 Aug 2005 08:01:41 +1000, Manfred Bergmann wrote:
Hi Sanri.
I'm thinking of doing something like this, too.
But I guess this is not posible with a plain NSTableView.
I thought of making it with a NSMatrix where you can use any
kind of
data cell.
You can respond on the Key events to do the navigation you want.
[homerSimpsonVoice:TRUE]
"mmmmmhhhhhh ... NSMatrix... sounds good, but it doesn't have any IB
palette or something similar to easily figure out what to do.
Are there good, and PLAIN, SIMPLE examples on how to use it?
Sorry Apple, but when it comes to PLAIN AND SIMPLE source code,
you're
not the no. 1 :-((
[homerSimpsonVoice:FALSE]
--
Sanri Parov
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden