We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Implement something like this code (taken from https://stackoverflow.com/questions/48573024/add-scrollbar-to-winforms-combobox/48573154) to make the preset list as large as the longest preset name so it's always visible.
ComboBox senderComboBox = (ComboBox)sender; int width = senderComboBox.DropDownWidth; Graphics g = senderComboBox.CreateGraphics(); Font font = senderComboBox.Font; int vertScrollBarWidth = (senderComboBox.Items.Count > senderComboBox.MaxDropDownItems) ? SystemInformation.VerticalScrollBarWidth : 0; int newWidth; foreach (string s in ((ComboBox)sender).Items) { newWidth = (int)g.MeasureString(s, font).Width + vertScrollBarWidth; if (width < newWidth) { width = newWidth; } } senderComboBox.DropDownWidth = width;
The text was updated successfully, but these errors were encountered:
354616f
Premo36
No branches or pull requests
Implement something like this code (taken from https://stackoverflow.com/questions/48573024/add-scrollbar-to-winforms-combobox/48573154) to make the preset list as large as the longest preset name so it's always visible.
The text was updated successfully, but these errors were encountered: