To change the appearance of an object when the user moves the mouse over it, you must first create a new object using the GetAppearance function. For a Button object named option1, use the following syntax:
ButAppearanceMO = option1.GetAppearance("Mouse Over")
Note: The variable ButAppearanceMO will now contain the mouse over appearance properties: Alpha, Background, Border, Button Colour, Flare, Image, Shadow, Texture and Transparency. Using the new object created in Example 1 above, we can now set new appearance for properties or remove existing properties. In the expanded example below we have created the new object and removed the flare for the Button object named option1 and changed the button’s surface colour. ButAppearanceMO = option1.GetAppearance("Mouse Over") Note:Example 2:
ButAppearanceMO.RemoveFlare()
ButCol = RGB(0,0,255)
ButAppearanceMO.SetBtnColour(ButCol)
The SetBtnColour function requires a colour value for the surface colour – in this example, we have used the RGB function to set the colour to blue. The SetBtnColour function also allows you to change other parameters as well, such as its light bevel colour and bevel width but these are optional parameters and ignored for the purpose of this example.