Re: Question about NSTableView and column reordering...
Re: Question about NSTableView and column reordering...
- Subject: Re: Question about NSTableView and column reordering...
- From: Conor Dearden <email@hidden>
- Date: Wed, 16 Aug 2006 10:00:00 +0200
You can use the notification tableViewColumnDidMove:
- (void)tableViewColumnDidMove:(NSNotification *)aNotification {
NSDictionary *userInfo = [aNotification userInfo];
//if they try to move the first column out move it back
if ([[userInfo objectForKey:@"NSOldColumn"] intValue] == 0) {
[table moveColumn:[[userInfo objectForKey:@"NSNewColumn"] intValue]
toColumn:0];
}
// if they try to move a column in front of the first column move it
back
else if ([[userInfo objectForKey:@"NSNewColumn"] intValue] == 0) {
[table moveColumn:0 toColumn:[[userInfo
objectForKey:@"NSOldColumn"] intValue]];
}
}
Conor
http://www.bruji.com/
_______________________________________________
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