Re: How to code a TableView into a CustomView?
Re: How to code a TableView into a CustomView?
- Subject: Re: How to code a TableView into a CustomView?
- From: "Mark's Studio" <email@hidden>
- Date: Fri, 9 Nov 2001 21:28:37 +0100
On fredag, november 9, 2001, at 09:00 , Erik M. Buck wrote:
>
> [(NSControl *)tableView setEnabled: NO]
>
>
there is no reason to cast. ALL instances of NSTableView are ALSO
>
instances
>
of NSControl due to inheritance. A NSTableView "IS A" NSControl.
>
>
> [tableView setEnabled: NO]
>
>
This is fine
>
>
> and nothing really happens
>
>
What do you expect to happen ?
I expect it to draw grayed and don't accept clicks.
>
>
>
>
> I can't seem to find anything about setEnable in NSView,
>
>
Maybe i should explain what im trying to do.
I want to have a matrix of tableViews,
but since matrix only can have cells and not views,
i though i could code it into a customview so i could
control what tableviews are to draw since not all views in the
matrix should be enabled at a time.
So i think in this case it's OK to remove the view since it's
a sub part of the custom view.
but i prefer if i could disable the tableview, just like a control.
>
As I said, -setEnabled: is a method of NSControl. NSTableView is a
>
subclass
>
of NSControl which is a subclass of NSView which is a subclass of
>
NSResponder which is a subclass of NSObject. Every class has all of the
>
methods of all of its super classes. You must look at the super class
>
documentation. That is probably why a link to NSControl's
>
documentation is
>
the FIRST link in the NSTableView documentation.
>
>
Maybe you would like to disable all or some of the cells in the table ?
>
Maybe you would like to show no cells in the tables that are
>
disabled ? You
>
can implement both of those behaviors in your table's data source.
>
>
>
>
>
>
>>
>
>>
>
>>
>
>>
>
> Peter Mark
>
>
>
> Mark's Recording Studio A/S
>
> Faelledvej 19 b DK2200 N
>
> Copenhagen Denmark
>
> Tel: +45 35366078 Fax: +45 35366038
>
> www.marks-studio.dk
>
> email@hidden
>
>
>
>
>
Peter Mark
Mark's Recording Studio A/S
Faelledvej 19 b DK2200 N
Copenhagen Denmark
Tel: +45 35366078 Fax: +45 35366038
www.marks-studio.dk
email@hidden