- Where Developers Learn, Share, & Build Careers


I have an NSSearchField and I want to change its background color, but I am not able to do it, Tried:

1) I tried to set the drawback area and then set the setbackgram coiler but the value of the dockback ground is always wrong or I try to set it a trough code or nibb. (I do not know why?)

2) I tried to set NSText background coler but it does not look good because it is not wrapping the entire NSSchild in extreme corners, where small search The icon and the cancel mark are present, which remain unstable.

3) I want to see that the color of the searchField is lying, so I have reduced the alpha value of the search film, which looks good, but the alpha value of the text also decreases Therefore the alpha value of the text is always to be 1.

NSSearchField is the extension of NSTextField, then NSTextField Expanding of NSView,

It is possible not to recreate, but to create custom colors and overwrite the drawRect function and paint with background color.

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -