• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTableView customization
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView customization


  • Subject: Re: NSTableView customization
  • From: Brent Gulanowski <email@hidden>
  • Date: Fri, 14 May 2004 17:48:14 -0400

On May 14, 2004, at 3:55 PM, Ibrahim Bulut wrote:

> Hi all,
>
> Is there a way to disable editing tableview cells? and I have connected
> a selector to the tableview, so my function is called when I click a
> row, is there a way to trigger this selector while using arrow keys as
> well?
>
> Thanks for any help :)
>
>
> /Ibrahim
>


Please see NSTableView.h and docs for various methods to add to an
appropriate class (whichever can best respond) that will be called to
check what to do. They are all optional. There are some nice
notifications you can respond to, also. Read about these in the
documentation. Make sure you are comfortable with the concept of
delegation.

<http://developer.apple.com/documentation/Cocoa/Conceptual/
CommunicateWithObjects/Articles/Delegates.html>


@interface NSObject(NSTableViewDelegate)

- (void)tableView:(NSTableView *)tableView willDisplayCell:(id)cell
forTableColumn:(NSTableColumn *)tableColumn row:(int)row;
- (BOOL)tableView:(NSTableView *)tableView
shouldEditTableColumn:(NSTableColumn *)tableColumn row:(int)row;
- (BOOL)selectionShouldChangeInTableView:(NSTableView *)aTableView;
- (BOOL)tableView:(NSTableView *)tableView shouldSelectRow:(int)row;
- (BOOL)tableView:(NSTableView *)tableView
shouldSelectTableColumn:(NSTableColumn *)tableColumn;

- (void) tableView:(NSTableView*)tableView
mouseDownInHeaderOfTableColumn:(NSTableColumn *)tableColumn;
- (void) tableView:(NSTableView*)tableView
didClickTableColumn:(NSTableColumn *)tableColumn;
- (void) tableView:(NSTableView*)tableView
didDragTableColumn:(NSTableColumn *)tableColumn;

@end

/*
* Notifications
*/
APPKIT_EXTERN NSString *NSTableViewSelectionDidChangeNotification;
APPKIT_EXTERN NSString *NSTableViewColumnDidMoveNotification; //
@"NSOldColumn", @"NSNewColumn"
APPKIT_EXTERN NSString *NSTableViewColumnDidResizeNotification; //
@"NSTableColumn", @"NSOldWidth"
APPKIT_EXTERN NSString *NSTableViewSelectionIsChangingNotification;


--
Brent Gulanowski email@hidden

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >NSTableView customization (From: Ibrahim Bulut <email@hidden>)

  • Prev by Date: Re: Window Styles
  • Next by Date: Re: window rotation
  • Previous by thread: Re: NSTableView customization
  • Next by thread: Re: NSTableView customization
  • Index(es):
    • Date
    • Thread