Custom field editor for NSTextFieldCell in an NSTableView

前端 未结 5 1474
情歌与酒
情歌与酒 2021-02-06 16:39

I have a custom NSTableView subclass filled with several custom NSTextFieldCell subclasses. I would like to be able to change the edited cell by using

5条回答
  •  不思量自难忘°
    2021-02-06 17:25

    Possibly related entry in Apple documentation:

    setFieldEditor:

    Controls whether the text views sharing the receiver’s layout manager behave as field editors.

    - (void)setFieldEditor:(BOOL)flag
    

    Parameters

    flag: YES to cause the text views sharing the receiver's layout manager to behave as field editors, NO otherwise.

    Discussion

    Field editors interpret Tab, Shift-Tab, and Return (Enter) as cues to end editing and possibly to change the first responder. Non-field editors instead accept these characters as text input. See “Text Fields, Text Views, and the Field Editor” for more information on field editors. By default, text views don’t behave as field editors.

提交回复
热议问题