For the HTML Layout Control we have created two bitmaps, one to represent the Disabled state and another for the Enabled state. We then used the Microsoft Form 2.0 image control and laid the two images directly on top of each other. Using the hotspot control we created a hotspot the same size as the bitmaps and laid this on top of the two bitmaps. Then through script we modified the MouseEnter and MouseExit events for the hotspots, making the Enabled bitmap visible during the MouseEnter event and the Disabled bitmap visible on the MouseExit.
To ensure that the bitmaps are viewed correctly the first time, in the OnLoad event we made sure that all the Disabled bitmaps are visible and that all the Enabled bitmaps are not.
<SCRIPT FOR=Layout1 EVENT=OnLoad()> b1on.Visible = false b1off.Visible = true b2on.Visible = false b2off.Visible = true b3on.Visible = false b3off.Visible = true b4on.Visible = false b4off.Visible = true b5on.Visible = false b5off.Visible = true </SCRIPT>
Here we have the MouseEnter and MouseExit event functions for the first bitmap. These functions are then repeated for each bitmap thereafter.
<SCRIPT FOR=HotSpot1 EVENT=MouseEnter()> b1on.Visible = true b1off.Visible = false </SCRIPT> <SCRIPT FOR=HotSpot1 EVENT=MouseExit()>> b1on.Visible = false b1off.Visible = true </SCRIPT>© 1999 Microsoft Corporation. All rights reserved. Terms of use.