Monday, August 02, 2004 4:27 PM
by
brian
RolloverImageButton Control Updated
Duncan asked about modifying the RolloverImageButton control to support 3 states: normal, mouseOver, and mouseDown. Sounded like a good idea so here’s the new version of the RolloverImageButton Control. Along with the rollover image, I added a new property, MouseDownImageUrl, that holds the path to the image that is displayed when the mouse is pressed over the control. Like the previous version, all of the images for every button you have on the page are preloaded when the page loads. The control inherits from the ImageButton control. It even works in freakin’ Mac browsers :)
On a side note. I’ve downloaded and tried a couple other rollover type controls. One wasn’t actually pre-downloading the rollover images like it was supposed to. It was looking on the server for the clientID of the image, not the image name. I didn’t realize it until I was looking at my pages using Fiddler and saw numerous 404 errors hiding in the HTTP Requests. The moral is, check that the free controls are doing everything they are supposed to be doing. If mine ever aren’t, drop me a line.
Another side note. This is cool. I didn’t actually think anyone would download it. I was just filling space mostly ;)