Results 1 to 2 of 2

Thread: ToolStripDropDown - hosted control doesn't fire MouseMove event

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2016
    Location
    Slovenia
    Posts
    575

    Angry ToolStripDropDown - hosted control doesn't fire MouseMove event

    Hi,

    I've implemented custom dropdown for my comboboxes, with embedded Datagridview, using ToolstripControlHost & ToolStripDropdown method. When dropdown is opened my DataGridView's MouseMove event is not working - It should move up/down to row records, simmilar to Combobox dropdown when you hover over Items.... But when I click DataGridView It's MouseMove event starts working, although focus works when dropdown is opened (I can scroll up/down in DataGridView). Here is my code:

    Code:
     protected override void OnDropDown(EventArgs e)
            {
                this.DroppedDown = false;
                
                if (!My_dropdown.Visible)
                {
                       My_dropdown.Show(this, 0, this.Height);
                        ToolstripCtlHost.Control.Location = new Point(0, 0);
                        ToolstripCtlHost.Control.Focus();
                    }
    
                }
            }
    What could possibly go wrong here ?? Any help kindly appreciated !!

    P.S.: Strangely all works fine when I'm filtering Datagridview from Combobox input textbox (I've set that also), but not when I open custom dropdown from OnDropDown event of combobox
    Last edited by LuckyLuke82; Feb 21st, 2018 at 02:52 PM.

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2016
    Location
    Slovenia
    Posts
    575

    Re: ToolStripDropDown - hosted control doesn't fire MouseMove event

    I still haven't found nothing to begin with, has anybody any idea ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width