|Jun 4, 2009, 12:15 AM||#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, 01: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|
|iPad: Where would an iPad fit in?||stonyboys||iPad||11||Nov 18, 2013 08:02 PM|
|Is Aperture a fit for me?||twoehr||Digital Photography||10||Oct 29, 2013 11:22 AM|
|Would a Powerbook G4 fit in this?||SawyerTHEBEST||PowerPC Macs||23||Feb 13, 2013 08:04 AM|
|Where does AE fit into my editing?||matteusclement||Digital Video||23||Jan 11, 2013 03:37 AM|
|Binding an NSNumber to an NSTableColumn||BadWolf13||Mac Programming||4||Dec 30, 2012 04:49 AM|
All times are GMT -5. The time now is 10:12 PM.