Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Button with a drop-down arrow

Button with a drop-down arrow

Scheduled Pinned Locked Moved C#
tutorialquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    David Wengier
    wrote on last edited by
    #1

    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

    E A 2 Replies Last reply
    0
    • D David Wengier

      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

      E Offline
      E Offline
      ehuysamer
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0
      • D David Wengier

        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

        A Offline
        A Offline
        Andy Moore
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups