Table cell, custom editor and editing frame

I use a custom editor when editing the contents of a cell inside a table view. From the docs, I see that the custom editor should be an NSTextView. So I put the text view in the document view, then I referenced it from a cell subclass via IBOutlet to designate it as a custom editor.

By doing all this, I can configure the editor not to draw its background, but a thick white frame is displayed when the user edits this cell, and there is no way to delete it.

So, I create an NSTextView programmatically, assign it as a custom editor, and the white frame does not appear, but I canโ€™t change the background now, set it to clearColor, set the font, fontColor, etc. I canโ€™t do anything about it. It is just a square with a dark background and white text.

Is there something I am not doing? Is this a bad approach?

Thank.

+3
source share
2 answers

Unlike you create an NSTextView from XIB, I create an NSTextView manually, and I have a white border. Does anyone know who draws the white border? NSTableView?

0
source

The border is drawn by drawRect: but I still don't know how to fix it by overriding drawRect: ...

: http://www.cocoabuilder.com/archive/cocoa/129091-solved-re-disabling-nstableview-big-black-editing-box.html#129259

0

Source: https://habr.com/ru/post/1757483/


All Articles