macoslib NSToolbar - Referencing ButtonItems

I have successfully implemented macoslib’s NSToolbar in my current project. However, I am having trouble referring back to a NSToolbarButtonItem. I reference all the toolbar items in my window open event, and in my ToolbarAction event, I am trying to do it so that the image of an item changes after it is pressed.

Here is my code (I’ve tried out different things, not all in the same instance):

NSToolbarButtonItem.tag(5).Image = MacIcon.NewIconFromOSInfo(MacIcon.kUnlockedIcon) Dim okb As NSToolbarButtonItem("GroupToolbarItem") okb.Image = MacIcon.NewIconFromOSInfo(MacIcon.kUnlockedIcon) NSToolbarItem(identifier.) = MacIcon.NewIconFromOSInfo(MacIcon.kUnlockedIcon) groupicon.Image = MacIcon.NewIconFromOSInfo(MacIcon.kUnlockedIcon)

Can anyone with experience of macoslib help with this?


Give it more than 12 hours. This is a voluntary forum.

Well it has already been 17 hours… (look at my orig post) :slight_smile:
Anyway, I can wait.