|Jun 3, 2009, 11:15 PM||#1|
NSTableColumn autosizing to fit
I have a NSTableView which has 2 columns. First columns contains strings. Some of these strings are long and are not visible completely in the column. I have also added HorizontalScroll bar to the TableView but no use. It scrolls the contents of the TableView but not of the column.
How can I request TableColumn to resize so that the longest string is the column is completely visible. The min and max width parameters of the TableColumn are set correctly. I have also tried using the Col. Sizing style but it did not help either. Any suggestions?
|Jun 4, 2009, 12:33 AM||#2|
I don't think there's a built-in way to do this, if I'm understanding it correctly. You could just use NSAttributedString to get the width of the string at the font (via the tablecolumn's datacell) and then set the column's width to that (plus a bit more probably for spacing).
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Is it really so hard to market a screen protector pre-cut to fit cases?||Vesian||iPhone Accessories||6||Sep 12, 2010 03:20 PM|
|Possible to resize all Finder windows to fit screen?||ss957916||OS X||3||Oct 1, 2009 08:34 AM|
|Library to big to fit on Ipod||GrayFoxSS||iPod||3||Apr 11, 2009 09:08 AM|
|How to use an exponential curve to fit the data under Excel 2008 for Mac?||hajime||Mac Applications and Mac App Store||0||Nov 13, 2008 06:57 AM|
|how to resize pictures to fit ipod touch||shadowmanifest||iPod touch||6||May 7, 2008 12:23 PM|
All times are GMT -5. The time now is 02:53 PM.