
I'm using the following code to add a combo box to my toolbar. I want to show the text of the combo box next to it. How do I do that?
My current "solution" is to create a disabled button next to it as a label. The problem is that this button's text is vertically off-center.
Thanks in advance for your help!
var mainScalingBarComboBoxCommand = new BarComboBoxCommand("Main", "Scaling", "Scaling", -1);
mainScalingBarComboBoxCommand.Items.Add("None");
mainScalingBarComboBoxCommand.Items.Add("Thousands");
mainScalingBarComboBoxCommand.Items.Add("Millions");
mainScalingBarComboBoxCommand.Items.Add("Billions");
mainScalingBarComboBoxCommand.Tag = "Scaling";
mainScalingBarComboBoxCommand.Text = "Scaling";
var mainScalingBarComboBoxLink = new BarComboBoxLink(mainScalingBarComboBoxCommand);
mainScalingBarComboBoxLink.Image = Properties.Resources.goto_16;
mainScalingBarComboBoxLink.DisplayStyle = BarCommandLinkDisplayStyle.ImageAndText;
mainScalingBarComboBoxLink.DefaultText = "Scaling";
mainScalingBarComboBoxLink.Text = "Scaling";
var labelButtonCommand = new BarButtonCommand("Main", "ScaleLabel", "Scale: ", -1);
var labelButtonLink = labelButtonCommand.CreateCommandLink();// new BarButtonLink(labelButtonCommand);
labelButtonLink.DisplayStyle = BarCommandLinkDisplayStyle.TextOnly;
labelButtonCommand.Tag = "Scale";
labelButtonCommand.Text = "Scale: ";
labelButtonCommand.Enabled = false;