Re: NSTableView - hiding columns
What is the effect of using: - (void)removeTableColumn:(NSTableColumn *)aTableColumn ? I assume this just removes the column and doesn't affect the datasource. And you can use the corresponding method: - (void)addTableColumn:(NSTableColumn *)aColumn When the need arises to reshow it. Ian. On 11/04/2008, at 10:28 PM, Valentin Dan wrote: The number of columns is dynamic as are the columns I need to hide ... it all depends on the settings access rights of the user. ___ Valentin Dan, Software Developer Direct: +1 905 886 1833 ext.3047 Email: [EMAIL PROTECTED] Office: +40 356-710158 Masstech Group Inc. Fax:+40 256-220912 http://www.masstechgroup.com THIS MESSAGE IS INTENDED ONLY FOR THE ADDRESSEE. IT MAY CONTAIN PRIVILEGED OR CONFIDENTIAL INFORMATION.ANY UNAUTHORIZED DISCLOSURE IS STRICTLY PROHIBITED.IF YOU HAVE RECEIVED THIS MESSAGE IN ERROR, PLEASE NOTIFY US IMMEDIATELY SO THAT WE MAY CORRECT THE RECORDS. PLEASE THEN DELETE THE ORIGINAL MESSAGE. THANK YOU. -Original Message- From: Ian Jackson [mailto:[EMAIL PROTECTED] Sent: 11 aprilie 2008 13:26 To: Valentin Dan Subject: Re: NSTableView - hiding columns Can't you just set the number of columns you want for your table in IB? Ian. On 11/04/2008, at 7:37 PM, Valentin Dan wrote: Hi, I have a table view that has visible vertical lines between columns. I’m trying to hide a column and I’m probably / certainly going about it the wrong way. Currently the only way I found to hide it was to set it’s width minimum width to 0 (I still need to work with it’s data in the background, I just don’t want the user to see the column so deleting it from the dataSource is not an option). The problem here is that the vertical lines do not disappear and although the width is 0, a small space remains and the aspect of multiple vertical column separators in the middle of the list is not pleasant. Is there a better way to do this? Thanks ! ___ Valentin Dan, Software Developer Direct: +1 905 886 1833 ext.3047 Email: HYPERLINK mailto:[EMAIL PROTECTED][EMAIL PROTECTED] Office: +40 356-710158 Masstech Group Inc. Fax:+40 256-220912 HYPERLINK http://www.masstechgroup.com/http://www.masstechgroup.com THIS MESSAGE IS INTENDED ONLY FOR THE ADDRESSEE. IT MAY CONTAIN PRIVILEGED OR CONFIDENTIAL INFORMATION.ANY UNAUTHORIZED DISCLOSURE IS STRICTLY PROHIBITED.IF YOU HAVE RECEIVED THIS MESSAGE IN ERROR, PLEASE NOTIFY US IMMEDIATELY SO THAT WE MAY CORRECT THE RECORDS. PLEASE THEN DELETE THE ORIGINAL MESSAGE. THANK YOU. No virus found in this outgoing message. Checked by AVG. Version: 7.5.519 / Virus Database: 269.22.12/1372 - Release Date: 10.04.2008 17:36 ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please 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: http://lists.apple.com/mailman/options/cocoa-dev/bianface%40gmail.com This email sent to [EMAIL PROTECTED] No virus found in this incoming message. Checked by AVG. Version: 7.5.519 / Virus Database: 269.22.12/1372 - Release Date: 10.04.2008 17:36 No virus found in this outgoing message. Checked by AVG. Version: 7.5.519 / Virus Database: 269.22.12/1372 - Release Date: 10.04.2008 17:36 ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: NSTableView - hiding columns
On 10.5 you should b able to hide directly (NSTableColumn setHidden method). . Otherwise the best way is to keep an NSArray around (for example in a subclass of NSTableView) where you add the column you want to hide. Then when you hide a column you add it to this array and delete it from the tableColumns array. As it is retained in your array you do not need to recreate everything each time and simply swap it between the 2 NSArray HTH laurent On Apr 11, 2008, at 9:37 AM, Valentin Dan wrote: Hi, I have a table view that has visible vertical lines between columns. I’m trying to hide a column and I’m probably / certainly going about it the wrong way. Currently the only way I found to hide it was to set it’s width minimum width to 0 (I still need to work with it’s data in the background, I just don’t want the user to see the column so deleting it from the dataSource is not an option). The problem here is that the vertical lines do not disappear and although the width is 0, a small space remains and the aspect of multiple vertical column separators in the middle of the list is not pleasant. Is there a better way to do this? Thanks ! ___ Valentin Dan, Software Developer Direct: +1 905 886 1833 ext.3047 Email: HYPERLINK mailto:[EMAIL PROTECTED][EMAIL PROTECTED] Office: +40 356-710158 Masstech Group Inc. Fax:+40 256-220912 HYPERLINK http://www.masstechgroup.com/http://www.masstechgroup.com THIS MESSAGE IS INTENDED ONLY FOR THE ADDRESSEE. IT MAY CONTAIN PRIVILEGED OR CONFIDENTIAL INFORMATION.ANY UNAUTHORIZED DISCLOSURE IS STRICTLY PROHIBITED.IF YOU HAVE RECEIVED THIS MESSAGE IN ERROR, PLEASE NOTIFY US IMMEDIATELY SO THAT WE MAY CORRECT THE RECORDS. PLEASE THEN DELETE THE ORIGINAL MESSAGE. THANK YOU. No virus found in this outgoing message. Checked by AVG. Version: 7.5.519 / Virus Database: 269.22.12/1372 - Release Date: 10.04.2008 17:36 ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please 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: http://lists.apple.com/mailman/options/cocoa-dev/lcerveau%40mac.com This email sent to [EMAIL PROTECTED] ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
RE: NSTableView - hiding columns
Actually … you might be right :-) ___ Valentin Dan, Software Developer Direct: +1 905 886 1833 ext.3047 Email: HYPERLINK mailto:[EMAIL PROTECTED][EMAIL PROTECTED] Office: +40 356-710158 Masstech Group Inc. Fax:+40 256-220912 HYPERLINK http://www.masstechgroup.com/http://www.masstechgroup.com THIS MESSAGE IS INTENDED ONLY FOR THE ADDRESSEE. IT MAY CONTAIN PRIVILEGED OR CONFIDENTIAL INFORMATION.ANY UNAUTHORIZED DISCLOSURE IS STRICTLY PROHIBITED.IF YOU HAVE RECEIVED THIS MESSAGE IN ERROR, PLEASE NOTIFY US IMMEDIATELY SO THAT WE MAY CORRECT THE RECORDS. PLEASE THEN DELETE THE ORIGINAL MESSAGE. THANK YOU. _ From: Valentin Dan Sent: 11 aprilie 2008 14:01 To: 'Ian Jackson' Cc: CocoaDev list Subject: RE: NSTableView - hiding columns I could do that if all the columns I wanted to hide were at the end of the column list … but if I remove a column in the middle and do not reflect that change in the dataSource it uses, the columns after it will contain wrong data. ___ Valentin Dan, Software Developer Direct: +1 905 886 1833 ext.3047 Email: HYPERLINK mailto:[EMAIL PROTECTED][EMAIL PROTECTED] Office: +40 356-710158 Masstech Group Inc. Fax:+40 256-220912 HYPERLINK http://www.masstechgroup.com/http://www.masstechgroup.com THIS MESSAGE IS INTENDED ONLY FOR THE ADDRESSEE. IT MAY CONTAIN PRIVILEGED OR CONFIDENTIAL INFORMATION.ANY UNAUTHORIZED DISCLOSURE IS STRICTLY PROHIBITED.IF YOU HAVE RECEIVED THIS MESSAGE IN ERROR, PLEASE NOTIFY US IMMEDIATELY SO THAT WE MAY CORRECT THE RECORDS. PLEASE THEN DELETE THE ORIGINAL MESSAGE. THANK YOU. _ From: Ian Jackson [mailto:[EMAIL PROTECTED] Sent: 11 aprilie 2008 13:55 To: Valentin Dan Cc: CocoaDev list Subject: Re: NSTableView - hiding columns What is the effect of using: - (void)removeTableColumn:(HYPERLINK file:///Developer\\Documentation\\DocSets\\com.apple.ADC_Reference_Library.CoreReference.docset\\Contents\\Resources\\Documents\\documentation\\Cocoa\\Reference\\ApplicationKit\\Classes\\NSTableColumn_Class\\Reference\\Reference.html#//apple_ref/doc/c_ref/NSTableColumnNSTableColumn *)aTableColumn ? I assume this just removes the column and doesn't affect the datasource. And you can use the corresponding method: - (void)addTableColumn:(HYPERLINK file:///Developer\\Documentation\\DocSets\\com.apple.ADC_Reference_Library.CoreReference.docset\\Contents\\Resources\\Documents\\documentation\\Cocoa\\Reference\\ApplicationKit\\Classes\\NSTableColumn_Class\\Reference\\Reference.html#//apple_ref/doc/c_ref/NSTableColumnNSTableColumn *)aColumn When the need arises to reshow it. Ian. On 11/04/2008, at 10:28 PM, Valentin Dan wrote: The number of columns is dynamic as are the columns I need to hide ... it all depends on the settings access rights of the user. ___ Valentin Dan, Software Developer Direct: +1 905 886 1833 ext.3047 Email: HYPERLINK mailto:[EMAIL PROTECTED][EMAIL PROTECTED] Office: +40 356-710158 Masstech Group Inc. Fax:+40 256-220912 HYPERLINK http://www.masstechgroup.comhttp://www.masstechgroup.com THIS MESSAGE IS INTENDED ONLY FOR THE ADDRESSEE. IT MAY CONTAIN PRIVILEGED OR CONFIDENTIAL INFORMATION.ANY UNAUTHORIZED DISCLOSURE IS STRICTLY PROHIBITED.IF YOU HAVE RECEIVED THIS MESSAGE IN ERROR, PLEASE NOTIFY US IMMEDIATELY SO THAT WE MAY CORRECT THE RECORDS. PLEASE THEN DELETE THE ORIGINAL MESSAGE. THANK YOU. No virus found in this incoming message. Checked by AVG. Version: 7.5.519 / Virus Database: 269.22.12/1372 - Release Date: 10.04.2008 17:36 No virus found in this outgoing message. Checked by AVG. Version: 7.5.519 / Virus Database: 269.22.12/1372 - Release Date: 10.04.2008 17:36 No virus found in this outgoing message. Checked by AVG. Version: 7.5.519 / Virus Database: 269.22.12/1372 - Release Date: 10.04.2008 17:36 ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]