How can I programmatically know if a NSTextField is currently displaying a placeholder ?
In other terms, if a placeholder has been assigned to it… ?
thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use the method:
Returns the cell’s plain text placeholder string.
This method is declared in NSTextFieldCell and The
NSTextFieldclass uses theNSTextFieldCellclass to implement its user interface:All of the methods declared by this class are also declared by the NSTextField class, which uses NSTextFieldCell objects to draw and edit text. These NSTextField cover methods call the corresponding NSTextFieldCell methods.
Example (the placeholder must be access via the textfield’s cell):