Re: NSTableView first column reorder...
Re: NSTableView first column reorder...
- Subject: Re: NSTableView first column reorder...
- From: Chas Spillar <email@hidden>
- Date: Tue, 05 Dec 2006 11:24:12 -0800
- Thread-topic: NSTableView first column reorder...
I found a solution...
I implement the delegate method:
- (void) tableView:(NSTableView *)tableView
mouseDownInHeaderOfTableColumn:(NSTableColumn *)tableColumn
{
if (tableView == myTableView) {
if ([tableColumn identifier] isEqualToString:@"title"])
[tableView setAllowsColumnReordering:NO];
} else {
[tableView setAllowsColumnReordering:YES];
}
}
}
This has the desired effect. It prevents the drag from beginning at all on
the first column (which is what I wanted).
Chas.
> From: apparao <email@hidden>
> Date: Tue, 05 Dec 2006 12:09:06 +0530
> To: Cocoa Dev List <email@hidden>
> Subject: Re: NSTableView first column reorder...
>
> Use - (void)tableView:(NSTableView *)tableView didDragTableColumn:
> (NSTableColumn *)tableColumn delegate method and skip first table
> column by using table identifier.
>
>
> On 05-Dec-06, at 9:50 AM, Chas Spillar wrote:
>
>> Hello,
>>
>> I want to enable an NSTableView which you can reorder all the
>> columns except
>> for the first one. That is, you can drag all the columns after the
>> first
>> one to different relative locations (e.g. You can drag column 2 to
>> position
>> 3, etc.) Does anyone know how I would do this?
>>
>> Chas.
>>
>>
>> _______________________________________________
>>
>> Cocoa-dev mailing list (email@hidden)
>>
>> Do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>>
>> Help/Unsubscribe/Update your Subscription:
>> 40effigent.net
>>
>> This email sent to email@hidden
>>
>
> Apparao
> ------------------------------------------------------------
> Apparao Mulpuri
> Effigent India Pvt. Ltd.
> Web: http://www.effigent.com
> ------------------------------------------------------------
>
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden