Re: NSToolbarItem validation
Re: NSToolbarItem validation
- Subject: Re: NSToolbarItem validation
- From: Tommy Nordgren <email@hidden>
- Date: Tue, 14 Mar 2006 17:10:54 +0100
On 14 mar 2006, at 17.02, email@hidden wrote:
I set up subclass of NSToobarItem in order to validate my tool bar
items which contain buttons. In the validation method I check if
the button is enabled, and use that to enable/disable the toobar
item. The button is enabled/disabled through a binding. Initially
the toolbar item is disabled. The text label is grey. But later,
the button is enabled, the validate method calls [self
setEnabled:YES], but the text label remains greyed out. The button
in the toolbar item is however active.
I notice that in this state, I can get the text to darken and to
appear active by resizing my window causing the neighboring toolbar
item to 'bump' into the sticking one. What am I doing wrong that
requires the jostle? Is there a way to programatically jostle the
sticky item? (just kidding)
From the NSView Docs (a base class of NSButton)
Whenever the data or state used for drawing a view object changes,
the view should be sent a setNeedsDisplay:
------------------------------------------------------
"Home is not where you are born, but where your heart finds peace" -
Tommy Nordgren, "The dying old crone"
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden