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. Windows Forms
  4. toolStripSplitButton Doesn;t comes in Pressed state.

toolStripSplitButton Doesn;t comes in Pressed state.

Scheduled Pinned Locked Moved Windows Forms
4 Posts 2 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.
  • U Offline
    U Offline
    User 4038468
    wrote on last edited by
    #1

    Hi All, I am inserting a toolStripSplitButton into the ToolStrip. And all the things are going fine. At run time. when I select a Item from a DropDown items, the button part of the Split Button doesn't comes into the Pressed state.That is end user will not get to know that the item is selected. I want the button part of the Split Button should work like a toggle button when a item is selected from DropDown or from the Button directly. Let me known about the rendering if required, I do not know much about Rendering. thanks Rahul Kapoor.

    L 1 Reply Last reply
    0
    • U User 4038468

      Hi All, I am inserting a toolStripSplitButton into the ToolStrip. And all the things are going fine. At run time. when I select a Item from a DropDown items, the button part of the Split Button doesn't comes into the Pressed state.That is end user will not get to know that the item is selected. I want the button part of the Split Button should work like a toggle button when a item is selected from DropDown or from the Button directly. Let me known about the rendering if required, I do not know much about Rendering. thanks Rahul Kapoor.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      You can set the ButtonPressed[^]-property in the DropDownItemClicked[^]-event :)

      I are Troll :suss:

      U 1 Reply Last reply
      0
      • L Lost User

        You can set the ButtonPressed[^]-property in the DropDownItemClicked[^]-event :)

        I are Troll :suss:

        U Offline
        U Offline
        User 4038468
        wrote on last edited by
        #3

        Sir, let me know how can I set a read only property ? Let me know something from the corner.

        L 1 Reply Last reply
        0
        • U User 4038468

          Sir, let me know how can I set a read only property ? Let me know something from the corner.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          My bad, I mixed up the ToolStripSplitButton with a ToolStripButton. The property is indeed readonly, I didn't find any "nice" solution to display the button in a checked state. It has been reported on Microsoft Connect[^] in 2005, but it doesn't mention what version of the Framework that this applies to. There's no Checked property in the ToolStripSplitButton, nor in the ToolStripDropDownButton. That leaves only the option of extending the controls and building the desired functionality yourself, using owner-drawing. I found a thread of someone who did that here[^].

          I are Troll :suss:

          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