I’m trying to remove the border of an NSTokenField. An NSTextField (from which an NSTokenField inherits) has the border property exposed but I can’t seem to access it in NSTokenField.
I’m trying to mimic the style in the ‘Language & Region’ System Preferences panel - Advanced button, Dates panel. It’s not a biggie, but grateful for any assistance.
Have you tried the “setBordered” method which is also inherited ?
Yeah, I’ve tried but can’t access it.
I see that Dethomsoft has implemented the NSTokenField in his plugins, which I own, so I’m now trying to go down that route.
Cant access it ?
Why not ?
Its an inherited instance method you should be able to declare into & off you go
[quote=186630:@Norman Palardy]Cant access it ?
Why not ?
Its an inherited instance method you should be able to declare into & off you go[/quote]
I got a good old “Selector not recognized” exception for my efforts. That was last night, been playing with dtPlugins today so I’ll go back to MacOSLib and try again if I get no further there. Thanks.
The NSTokenField class in macoslib does not have a Bordered property, but I am able to add one and it works. Once I solve some unfortunate git problems of my own making, I’ll commit it. In the meantime, here are the declares to add it to your own code.
declare function isBordered lib CocoaLib selector "isBordered" (this as Ptr) as Boolean
declare sub setBordered lib CocoaLib selector "setBordered:" (this as Ptr, value as Boolean)