user1890307
user1890307

Reputation: 53

NSTokenField - read only but draggable tokens

I have a XIB file which contains NSTokenField, i am adding tokens programatically.

I would like the NSTokenField to be read only (not editable) but still allow the user to rearrange the tokens by drag and drop.

I have tried to change the Behavior in the attributes editor from: "Editable" to: "Selectable", though it wont allow the user to edit, i am loosing the ability to drag and drop tokens inside the NSTokenField.

Do you have any idea how to accomplish a NSTokenField with draggable tokens but still not editable by the user?

Thanks in advance,

BR, Mefuzar

Upvotes: 0

Views: 240

Answers (1)

Set "Behavior" to "Selectable" in interface builder (or isSelectable = true, isEditable = false programatically).

Upvotes: 1

Related Questions