FROM : P Teeson
DATE : Wed Jun 25 23:54:15 2008
On 25-Jun-08, at 3:21 PM, Marco Masser wrote:
>> Once it is pushed it stays pushed - pushing it again does not
>> revert it back to unpushed state.
>
> You could simply hook up an appropriate kind of a standard NSButton
> to an IBAction that disables the button.
> That way, you can't click it anymore and it stays pushed.
> If you don't want it to be grayed out upon disabling, you could
> maybe subclass
> NSButton and find out which method gets called to draw a disabled
> button and
> overwrite that (I never did that and there's probably a more
> elegant solution for this).
>
> Marco
Yes it's already hooked up to an action in the Controller. I got this
working before posting.
But then I started to think about what happens when the button is
next pressed. Hence the question.
Savants suggestion to set state and then disable in responding to the
first click is interesting.
Thanks Marco.
DATE : Wed Jun 25 23:54:15 2008
On 25-Jun-08, at 3:21 PM, Marco Masser wrote:
>> Once it is pushed it stays pushed - pushing it again does not
>> revert it back to unpushed state.
>
> You could simply hook up an appropriate kind of a standard NSButton
> to an IBAction that disables the button.
> That way, you can't click it anymore and it stays pushed.
> If you don't want it to be grayed out upon disabling, you could
> maybe subclass
> NSButton and find out which method gets called to draw a disabled
> button and
> overwrite that (I never did that and there's probably a more
> elegant solution for this).
>
> Marco
Yes it's already hooked up to an action in the Controller. I got this
working before posting.
But then I started to think about what happens when the button is
next pressed. Hence the question.
Savants suggestion to set state and then disable in responding to the
first click is interesting.
Thanks Marco.






Cocoa mail archive

