• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSToolbarItem setImage problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSToolbarItem setImage problems


  • Subject: NSToolbarItem setImage problems
  • From: Jeffrey J Barbose <email@hidden>
  • Date: Sun, 25 Apr 2004 18:19:42 -0700

I'm trying to dynamically change the image and label of an NSToolbarItem using setImage: and setLabel: , when the option key is held down.

i've overridden flagsChanged: to detect the state of the option key (pressed or not), and call thru to a function which calls setImage:

the code gets hit, the image that needs to be set is the correct one for each state, and setImage is called.
same thing for the label.

i've added NSLog's to report what the NSToolbarItem says it's displaying, and that agrees with what is supposed to be there.

The trouble is that the image and the label never get updated in the UI. I can't find any API for forcing a redraw.

I've read that others have this kind of thing working..and i've seen it work in iPhoto with the rotate image item.

Any help would be appreciated.

jeff





god of biscuits speaks!
--------------------------------------
http://blog.godofbiscuits.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • [SOLVED] Re: NSToolbarItem setImage problems
      • From: Jeffrey J Barbose <email@hidden>
  • Prev by Date: Re: xCode 1.2
  • Next by Date: Re: xCode 1.2
  • Previous by thread: Invisible menu bar still locks the area?
  • Next by thread: [SOLVED] Re: NSToolbarItem setImage problems
  • Index(es):
    • Date
    • Thread