With modified code from Jim Mckay’s NSSearchfield, i’ve got a custom nstextfield with preferred background & border. The only thing that is a bit irritating is that it behaves like a multiline and some of the text from previous lines is shown when selecting the text.
I wan’t it to behave like a single line.
I found this code.
[myTextField.cell setUsesSingleLineMode:YES];
Declare sub setUsesSingleLineMode lib CocoaLib Selector "setUsesSingleLineMode:" (obj_id as Ptr, value as Boolean)
setUsesSingleLineMode(cell(myNSTextField), true)
Does this look correct, is there anything else I should also be setting?