C#C
C#3y ago
11 replies
Vera

❔ How do I remove white line on the left side of a ToolStripMenuItem in windows forms

I have already removed the image margin using this function I found on stackoverflow

private static void SetValuesOnSubItems(List<ToolStripMenuItem> items)
        {
            items.ForEach(item =>
            {
                var dropdown = (ToolStripDropDownMenu)item.DropDown;
                
                if (dropdown != null)
                {
                    dropdown.ShowImageMargin = false;

                    SetValuesOnSubItems(item.DropDownItems.OfType<ToolStripMenuItem>().ToList());
                }
            });
        }


However, this still leaves the white line on the left which I am looking to remove but I am unsure as to how to
Was this page helpful?