Changing font in NSOutlineview

NeilTurpNeilTurp GBMember ✭✭

I'm preparing an application for users and I need to configure some user-settings. One of these is the font that the outline view displays in, however it neither shows the changes on load nor lets the user change it. Here is the code:

internal NSOutlineview vwBookView;

in AwakefromNib()

vwBookView = new NSOutlineview()
vwBookView.Font = NSFont.FromFontName(sSavedFontname, nSavedFontSize); //both variables loaded correctly from settings.
NSTableColumn tc = new NSTableColumn("Book");
sv.DocumentView = vwBookView;

Stepping through the code, the Font value changes to the appropriate values but the displayed font remains unchanged. On the preferences dialogue, I have a similar line

vwBookView.Font = NSFont.FromFontName(sNewFontname, nNewFontSize);

and I've tried following this with a SetNeedsDisplayInRect and a SetNeedsDisplay call. Nothing changes the displayed font.

What am I missing?


Best Answer


Sign In or Register to comment.