Posted by member 71746 on 2003-12-15 14:01:30 link

Here's a method that might work for ya.

Edit the actual *image* for the bounding box that the label sits in. (I'm just assuming you have your label mounted into an LsBox or a SkinBox instead of just sitting on the desktop)
For the LsBox/SkinBox image, put the text "--winamp off--" down as part of the image itself.

Make sure the background image for the label is still the blank background.

In your label definition, use this:
"[hideIfEmpty([winampSong])]"

The result will be that the winamp song title box will *always* say "---winamp off---" but if winamp is loaded with a song title, the song title label will show itself, covering the "---winamp off---" text up with the label's bg image. The label will then put the song title text over top of the bg image and everything will be splendid :)

If winamp is closed, the label will become empty and hide itself, thus making the "---winamp off---" text visible :)

If you have the label displayed on the desktop instead of a bounding box, there's a little more to it. For that, you'd have to use 1 of 2 methods:

1) (the easy one) .. Create an LsBox the same size as the label with the same placement as the label. Use an image that's pure Magic Pink, with "---winamp off---" in whatever color you want. (NOTE: Don't anti-alias the text on magic pink or you'll end up with half-pink anti-aliasing that doesn't get turned transparent). Next, mount the label into that LsBox and use the same method as outlined before.

2) Create a second label with the same placement and size as the first, and have the text of this one be "---winamp off---" and the text of the first one be "[hideIfEmpty([winampSong])]". Have the winampSong label be hidden by default. Get subclass.dll and apply it to the winampSong label in such a way that when the winampSong label hides itself (itd be something like WinampLabelWindowOnHide), trigger !WinampInactiveLabelShow. When the winampSong label shows itself, trigger !WinampInactiveLabelHide. (This is presuming your "---winamp off---" label is named WinampInactiveLabel)

Method #2 is tidier than method #1, but both will get the job done :)