Opening the Drop-Down on MouseOver

By default, the C1DropDown control’s drop-down box only opens when users click on the drop-down arrow at run time. In this topic you’ll set the drop-down box to open when users mouse over the control at run-time instead. Note that this topic assumes you have already added a C1DropDown control which contains content to the application.

Complete the following steps:

1.   Click once on the C1DropDown control to select it.

2.   Navigate to the Properties window and click on the lightning bolt Events button to view events associated with the control.

3.   Double-click the box next to the IsMouseOverChanged item to switch to Code view and create the C1DropDown_IsMouseOver event handler.

4.   In Code view, add the following import statement to the top of the page:

      Visual Basic

      C#

5.   Add code to the C1DropDown_IsMouseOver event handler so it looks like the following:

      Visual Basic

      C#

This code sets the C1DropDown control’s actions when a user moves the cursor over the control at run time.

What You've Accomplished

In this topic you added code setting the IsDropDownOpen property so that the drop-down box opens on mouse over at run time. Run the application and move the mouse over the control. Notice that the drop-down box opens. Move the mouse away from the control and observe that the drop-down box closes.


Send us comments about this topic.
Copyright © GrapeCity, inc. All rights reserved.