Re: Font size in NSTableView

Markus Hitter <[email protected]>
Newsgroups gmane.comp.macosx.devel
Message-ID <[email protected]>
Am 17.02.2010 um 20:53 schrieb Christiaan Hofman:

> On Feb 17, 2010, at 20:07, Markus Hitter wrote:
>>
>> Am 17.02.2010 um 18:33 schrieb Christiaan Hofman:
>>
>>>> Well, change the font and NSTableView should adopt.
>>>
>>> NSTableView does not have a font.
>>
>> The cell's font, of course.
> Yes, and because of that the tableview's settings won't be  
> affected, because no property of the tableview is changed. This is  
> also exactly what happens (i.e. nothing).

Right. I already tried to explain NSTableView doesn't neccessarily  
have a "row height" property. Individual rows can have different  
heights and if you happen to replace the default cell with a custom  
cell, this cell is asked about what the row height should be. If  
there actually is such a property, it's a fallback at best.

So, if NSTableView does adjust for custom cells, but doesn't for the  
default text cell, a) file a bug about that and b) set the  
NSTableView's row height to the height of the size-to-fitted text cell.

For more illustration on how table views work, you can look up  
Cocotron and/or GNUstep source code. Both have a Cocoa compatible  
NSTableView implementation.


Markus

- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.