NSTextField - White text on black background, but black cursor

后端 未结 9 1072
温柔的废话
温柔的废话 2020-12-14 16:23

I\'ve setup an NSTextField with text color as white, and the background color as (black despite not rendering the background color, so its transparent). All in

9条回答
  •  青春惊慌失措
    2020-12-14 16:45

    TextField Insertion Point Color

    NSTextField *textField = self.textField;
    NSColor *insertionPointColor = [NSColor blueColor];
    
    NSTextView *fieldEditor = (NSTextView*)[textField.window fieldEditor:YES
                                                               forObject:textField];
    fieldEditor.insertionPointColor = insertionPointColor;
    

提交回复
热议问题