Vera
Vera
CC#
Created by Vera on 8/5/2023 in #help
❔ 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());
}
});
}
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
12 replies