In screenshot i marked that empty space with green rectangle, i want left and right space to be equal size in ToolStripMenuItem but right side have bigger empty area which i can't remove.
Codes:
private void UpdateWorkflowsMenu()
{
((ToolStripDropDownMenu)tsddbWorkflows.DropDown).ShowImageMargin = false;
tsddbWorkflows.DropDownItems.Clear();
Program.HotkeyManager.Hotkeys.ForEach<HotkeySettings>(x =>
{
if (x.TaskSettings.Job != HotkeyType.None && (!Program.Settings.WorkflowsOnlyShowEdited || !x.TaskSettings.IsUsingDefaultSettings))
{
ToolStripMenuItem tsmi = new ToolStripMenuItem(x.TaskSettings.Description);
if (x.HotkeyInfo.IsValidHotkey) tsmi.ShortcutKeyDisplayString = " " + x.HotkeyInfo.ToString();
tsmi.Click += (sender, e) => HandleTask(x.TaskSettings);
tsddbWorkflows.DropDownItems.Add(tsmi);
}
});
tsddbWorkflows.Visible = tsddbWorkflows.DropDownItems.Count > 0;
}
VB version (actually there are 18 pixels for arrow: 10 for size and 8 for margin, leave 2 pixels for margin)
Parent.DropDown.GetType.GetField("ArrowPadding",
Reflection.BindingFlags.NonPublic Or
Reflection.BindingFlags.Static).SetValue(Nothing, New Padding(0, 0, -16, 0))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With