controlTextDidBeginEditing is not being called when NSTextField is selected

StackOverflow https://stackoverflow.com/questions/19240909

  •  30-06-2022
  •  | 
  •  

Вопрос

controlTextDidBeginEditing delegate method is not being called when NSTextfield is selected by clicking or by pressing tab.The delegate is set and all other delegate methods are fired.Any suggestions??

Это было полезно?

Решение

To handle key events like Tab key press can be handled by writing setFieldEditor: method in the delegate method.For this requirement this method is suffice.

Another method is to override the NSTextfield class and writing keyDown: method.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top