How to make fancy iTunish sort headers

Using some other threads on this forum, I now have list views that highlight similar to iTunes – great.

Now I’d like to make header buttons that highlight when they sort. It seems like the best way to do this is to create buttons and attach a one pixel wide gradient image that repeats across the width of the button, and then change the image when the button is selected. I get strange results when I do this, however – the image doesn’t go across the full width, and sometimes you can’t see the button text.

Can anyone share how they pulled something like this off?

Thanks,

Andrew

You can make an image for the button, then when clicked you can set the imageMedia property of the button to a different image programatically.

Here is what a button looks like in my solution when I set border to empty and imageMedia to a one pixel wide bar with the preserve aspect ratio turned off. You can’t see the text and there is a little black dot in the bottom right corner. What am I doing wrong?

Picture 2.png

When you use a graphic in a button, the text gets pushed to the right of the graphic. So don’t use the text property with the button – use a separate text object and put on top of the button.

Ah, Thank you!

Anyway to make the button appear depressed (when clicking) when using a graphic button?

No, but you can set the rollover image property to a slightly darker version of your graphic. Isn’t the same thing but gives the human brain enough to go on.

Picture 3.png

Picture 5.png

thanks david.