Button with a drop-down arrow
-
I've searched all over, but I cant for the life of me find anywhere that someone has made (or knows how to make) a button with a drop-down arrow, like the button when you use "Add Existing Item" to a project, the Add button has a dropdown. Infragistics have a UltraDropDownButton that does this, but it doesn't look like a windows button and I can't get it to. Any tips? -- Dave
-
I've searched all over, but I cant for the life of me find anywhere that someone has made (or knows how to make) a button with a drop-down arrow, like the button when you use "Add Existing Item" to a project, the Add button has a dropdown. Infragistics have a UltraDropDownButton that does this, but it doesn't look like a windows button and I can't get it to. Any tips? -- Dave
Run character map and have a look at the Wingdings and Symbol fonts (I think the drop-down arrow that you're looking for is in Webdings 3). Enter the corresponding character in the button's text field, and set the appropriate font. You'd probably want give the button an "action" part for executing the default, and a "drop-down" part that shows your pop-up menu; so do this as two separate buttons. Putting these on a panel would also be a good idea. For the actual pop-up bit, set up a context menu to pop up when the user clicks on the drop-down button.
-
I've searched all over, but I cant for the life of me find anywhere that someone has made (or knows how to make) a button with a drop-down arrow, like the button when you use "Add Existing Item" to a project, the Add button has a dropdown. Infragistics have a UltraDropDownButton that does this, but it doesn't look like a windows button and I can't get it to. Any tips? -- Dave
Here is an example from a button control that I created. The drop-down arrow is represented by the number 6 in the Marlett font.
System.Drawing.Graphics g = this.CreateGraphics(); System.Drawing.Font font = new System.Drawing.Font("Marlett", this.Font.Size); System.Drawing.SizeF sizeF = g.MeasureString("6", font); Brush brush = Enabled ? SystemBrushes.ControlText : new SolidBrush(SystemColors.GrayText); g.DrawString("6", font, brush, Width - 4 - sizeF.Width, (Height - sizeF.Height) / 2.0f);
Human beings were not meant to sit in little cubicles staring at computer screens all day, filling out useless forms and listening to eight different bosses drone on about about mission statements. -- Peter Gibbons