Re: NSTableView column order in Interface Builder
Re: NSTableView column order in Interface Builder
- Subject: Re: NSTableView column order in Interface Builder
- From: Doug Knowles <email@hidden>
- Date: Fri, 22 Jul 2005 11:09:07 -0400
Hello, Kiel,
Thanks for the response. My question was about controlling the
initial, or default, column order of an NSTableView in Interface
Builder.
Specifically, I already have a four-column table defined, and I would
like to add a new column to the table as the second column from the
left. When I increment the column count in Interface Builder, the new
column usually (not always?) appears at the far right in the view, and
there is no way to re-position it in IB (that I can find). The only
way I have found to configure the table the way I want it is to adjust
the properties and bindings of the fifth, fourth, third, and second
table columns, which seems way harder than it should be.
I know I can enable the columns to be re-positioned at runtime, but
I'd like to specify the "out of the box" behavior in Interface
Builder.
Thanks again for the help.
Doug K;
On 7/21/05, Kiel Gillard <email@hidden> wrote:
> > I suspect that the answer to this is blindingly obvious, but it's been
> > bugging me for a while...
> >
> > When I add new columns to an NSTableView in Interface Builder, the
> > only way I can find to do it is adjust the number of columns in the
> > inspector. What I haven't figured out is how to control where the new
> > columns are positioned, or how to re-position them among the existing
> > columns according to my needs. It seems to dependent on which table
> > column was selected before I select the NSTableView (to make its
> > properties visible in the inspector), but I haven't detected a pattern
> > I can use.
>
> By default, table columns are added to a table as opposed to inserted
> (this is so in Interface Builder but you can subclass NSTableView to
> implement your own behaviour when you want to programmatically
> manipulate table columns).
>
> I'm not too sure what the last sentence of the above quoted paragraph
> was about, but you can arrange the table columns to the configuration/
> order you desire by simply dragging the header cells of the table
> column to the desired order in your table view. And, provided you've
> enabled the "Allows Column Re-Ordering" option for the properties of
> the TableView, your users can re-arrange the columns in the same
> manner, too.
>
> You are correct in saying that the only way to create a new table
> column in Interface Builder is to increment the Number of Columns
> count by however many new table columns you want.
>
> I'm not sure if this was any help, but I thought it might be worth
> mentioning.
>
> Kiel :-)
> "Be kind. Everyone you meet is fighting a hard battle."
> Attributed to both T.H. Thompson and John Watson
>
> _______________________________________________
> 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
>
_______________________________________________
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