NSColorPanel setSize?

Discussion in 'Mac Programming' started by Darkroom, Jun 27, 2008.

  1. Guest


    Dec 15, 2006
    Montréal, Canada
    is it possible to set the size of the NSColorPanel, pull down the swatches drawer and hide the toolbar all set to the app's defaults? i'd like to set it's default to the 2nd image...the 1st image is what the color panel looks like by default.

    Attached Files:

  2. Moderator emeritus


    Jul 24, 2002
    I think you can, but it's up to you as the developer to manage it yourself: NSColourPanel won't save/restore for you. If you check the state every time the picker is closed via the normal NSWindow methods for size/position (-frame:), toolbar visibility (-visible:) and the mode of the NSColourPanel (-mode:) you can save these to defaults. Whenever you create a new NSColourPanel simply use the correct methods to reset the panel to the defaults...

Share This Page