Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ToolStripSplitButton is not displaying dropdown arrow #44

Open
danielj23 opened this issue Oct 20, 2020 · 1 comment
Open

ToolStripSplitButton is not displaying dropdown arrow #44

danielj23 opened this issue Oct 20, 2020 · 1 comment

Comments

@danielj23
Copy link

danielj23 commented Oct 20, 2020

I tried poking around but I couldn't see how to resolve it.

When adding a ToolStripSplitButton to a DarkToolstrip, the dropdown arrow (on the right) is missing. The dropdown menu appears when you click in the space, but the button icon itself is missing.

The focus events are not rendering the mouse over, either.

Also, thanks for all your work on this project.

@danielj23
Copy link
Author

in DarkToolStripRenderer.cs I added the code below and that triggers the proper painting of the hovered area, but I haven't yet figured out the arrow. It seems odd to me that the arrow appears on the DropDownButton.

protected override void OnRenderSplitButtonBackground(ToolStripItemRenderEventArgs e)
{
var g = e.Graphics;

        var rect = new Rectangle(0, 1, e.Item.Width, e.Item.Height - 2);

        if (e.Item.Selected || e.Item.Pressed)
        {
            using (var b = new SolidBrush(BackColors.GreySelection))
            {
                g.FillRectangle(b, rect);
            }
        } 
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant