1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

Custom Views (NSTextField) in NSToolbar Items?

Discussion in 'Mac Programming' started by MorphingDragon, Sep 21, 2010.

  1. macrumors 603

    MorphingDragon

    #1
    I would like to get an NSTextField into an NSToolbar, sort of like the Address Bar in Safari. How could I do this? (I've considering layering a view over it but that defeats the purpose of having a customisable toolbar)

    I know that there's the Search Field item, but thats already used for another function.

    EDIT: Never mind, I found some Apple sample code.
     
  2. macrumors newbie

    #2
    For people who stumble on this topic looking for answers, you need to look at the setView: method in NSToolbarItem.

    MT
     
  3. macrumors 603

    MorphingDragon

    #3
    Well now I'm thoroughly pissed. I spent hours finding and writing code and this morning I find a way to drag views into the toolbar using IB. :/
     

Share This Page