SplitButton: an XP style dropdown split button.


 

image

If you like to have it “Auto Dropdown” whenever you are hover above the Main Button,

try add the following to the original code:

// Overrided this Method to support “Auto Dropdown”
protected override void OnMouseEnter(EventArgs e)
{
    if (_AlwaysDropDown || MouseInSplit())
    {
        if (Enabled)
        {
            SetSplit(_ClickedImage);

            if (this.ContextMenuStrip != null && this.ContextMenuStrip.Items.Count > 0)
            {
                this.ContextMenuStrip.Show(this, new Point(0, Height));
            }
        }
    }
    else
    {
        if (Enabled)
        {
            SetSplit(_NormalImage);
        }
    }

    base.OnMouseEnter(e);
}

 

Via CodeProject: SplitButton: an XP style dropdown split button. Free source code and programming help

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s