/// <summary> /// Adusts the size of the dropdown menu. /// </summary> protected static void AdjustDropDownSize(ContextMenuStrip graphicsProvider, ToolStripDropDownButton popupDropdown) { Graphics g = graphicsProvider.CreateGraphics(); Size textSize = g.MeasureString(popupDropdown.Text, popupDropdown.Font).ToSize(); popupDropdown.Width = textSize.Width; popupDropdown.Height = textSize.Height; }