Re: Alternatives to NSMatrix and NSTable?
Re: Alternatives to NSMatrix and NSTable?
- Subject: Re: Alternatives to NSMatrix and NSTable?
- From: Keary Suska <email@hidden>
- Date: Thu, 25 May 2006 08:43:49 -0600
on 5/25/06 3:17 AM, email@hidden purportedly said:
> I'm new to Cocoa and still trying things out. I'd like a spreadsheet
> type display. The columns can be of different widths and the rows of
> different heights.
>
> NSMatrix would seem to be right, except that all the cells have to be
> the same size.
>
> NSTable seems to be more suitable for displaying a database (table of
> records).
Actually, suitable for displaying *any* kind of tabular or
nonhierarchical-list data.
> So, do I need to create a custom view using NSControl and NSCell ? If
> so, I'm not getting very far with the NSControl documentation. :-(
Depending on what behaviors you want, you may have far less headaches using
NSTableView. The main limitation you will experience is that tableviews
don't know how to resize their rows in the same way their columns. If,
however, you want display behavior like Excel, such as live row resizing and
individual cell selection, you may have some difficulty. Row resizing is
probably the worst, since there are fairly easy ways to alter cell drawing.
There may be custom classes available that help with these kinds of tasks--I
have heard about classes from Omni Group but I have not been able to find
them. This route may be easiest.
Otherwise, I recommend looking mostly at your own custom NSView, and then
figuring out how you can do editing (e.g. using field editors and possibly
dynamically placed textfields).
Best,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
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