Re: Font size in NSTableView
Christiaan Hofman <[email protected]>
| Newsgroups | gmane.comp.macosx.devel |
|---|---|
| Message-ID | <[email protected]> |
On Feb 17, 2010, at 17:33, Markus Hitter wrote: > > Am 17.02.2010 um 17:00 schrieb Christiaan Hofman: > >> 1. NSTableView does NOT do it right on it own, because NSTableView does not do anything, it USES the settings it has (-rowHeight is a property that can be set, it's not a derived property.) > > ... but you agree NSTableView has a default setting? Likely the default setting is the height of the default cell, as NSTableView doesn't set, but caches the content's heights (likely). > But is that correct (given that the HIG does not agree)? And what if I want some different font? the height cache is also not relevant, that's something that's created as a RESULT of the settings, not the other way around. >> 3. I want to be able to change the font and row height, based on a user pref (compare Mail.app) > > Well, change the font and NSTableView should adopt. NSTableView does not have a font. > If it doesn't, support NSTableView by changing the cell's size. There's a -cellSizeForBounds and a -sizeToFit method. > > > Markus That does not answer anything. It does not say WHAT size I should use, which was my question, and moreover it's irrelevant. NSTableView also does not care. -[NSTableView sizeToFit] changes the column widths, not the rowHeight. Christiaan