Hi,
I'm drawing inside a custom NSSearchFieldCell subclass, but while the NSSearchField that the cell is in is active, the text gets drawn twice (once by my subclass and once somehow by the NSSearchField, I suppose).
As soon as I unselect the NSSearchField, e.g. by clicking inside a table view, the text gets drawn correctly (only once, by the cell).
A simple fix for this would of course be to let the cell only draw the text when the search field is inactive.
I tried to implement this, but I got stuck:
Is there nothing such as a - (BOOL)isSelected method for text fields or their cells?!
There must surely be some way to check if a text field is selected by the user!
Or do I miss a key concept of Cocoa?
Thanks for any input, I'm totally lost.
-ranguvar
I'm drawing inside a custom NSSearchFieldCell subclass, but while the NSSearchField that the cell is in is active, the text gets drawn twice (once by my subclass and once somehow by the NSSearchField, I suppose).
As soon as I unselect the NSSearchField, e.g. by clicking inside a table view, the text gets drawn correctly (only once, by the cell).
A simple fix for this would of course be to let the cell only draw the text when the search field is inactive.
I tried to implement this, but I got stuck:
Is there nothing such as a - (BOOL)isSelected method for text fields or their cells?!
There must surely be some way to check if a text field is selected by the user!
Or do I miss a key concept of Cocoa?
Thanks for any input, I'm totally lost.
-ranguvar