Re: Implementing a status indicator (like iChat's)
Re: Implementing a status indicator (like iChat's)
- Subject: Re: Implementing a status indicator (like iChat's)
- From: email@hidden
- Date: Tue, 24 Dec 2002 09:23:51 +0100
On mardi, dicembre 24, 2002, at 01:07 AM, Dylan McNamee wrote:
I'm writing a little app that monitors whether a couple daemons
are running, and allows you to start/stop another daemon.
In addition to the textual (foo is running) indication, I'd like
to have a colored dot change from green to red (or gray).
The closest analog to this out there is the status button next
to my name on iChat. Can anyone tell me how this thing might
have been implemented? It doesn't seem to be a widget available
in InterfaceBuilder.
I've got two problems with using an NSButton with no label:
1) when it's not got focus, all NSButtons seem to go gray.
2) it's too big
3) (for good measure) when I click on it, it toggles. (NSButtons
don't seem to go into "output-only" mode very well).
I did a little exploring of iChat's nibs in IB, but couldn't
figure out which nib corresponded to the buddy list window.
I did notice one tiff file with an amber gummy of the right size,
but no others. So I suspect it might be using some kind of
NSImage, but how is it doing red and green with only an amber
tiff?
Any ideas?
I think there's a sample code on this topic made by JCR on the ADC Web
site in the sample code section.
http://developer.apple.com/samplecode/Sample_Code/Cocoa/Tinted_Image.htm
Maybe it's what you're looking for.
_______________________________________________
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.