Drop Down Item Mouse Hover

I am using a context menu in a text box, and have a menu item called 'Quick BOM' - when the user hovers the mouse over this, a drop down menu for 'Quick BOM' opens that is dynamically created from an SQL query that populates this according to the part number in the text box. This all works fine.

The next function I want to add is for an event to be called when the user hovers the mouse over the new drop down menu that will allow me to do further analysis of this part number (such as recall a description and place in a label field). There is a DropDownItemClicked event, but what would be most useful is a 'DropDownItemMouseHover' type event.

Any suggestions on how to create such an event - the menu contents will change, along with the number of items in it according to the results of the SQL query

Any advice is much appreciated

Best regards

Luke



Answer this question

Drop Down Item Mouse Hover

  • MoniDD

    Luke Bedggood,

    You can write the MouseHover code as follows:

    Private Sub DropDownItemMouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles DropDownItem.MouseHover

    ' Update the mouse event label to indicate the MouseHover event occurred.

    label1.Text = sender.GetType().ToString() + ": MouseHover"

    End Sub

    The way you connect to the database is supposed to be DataSet, in this situation, just put your SQL query statement and the SqlCommand object and bind the data on your Labels like this: <%# DataBinder.Eval(Container, "DataItem.YourField") %>

    Hope that will help you.



  • vahdam_mn

    Do you mean a toolstrip dropdown



  • Drop Down Item Mouse Hover