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. .NET (Core and Framework)
  4. Displaying help in property grid control

Displaying help in property grid control

Scheduled Pinned Locked Moved .NET (Core and Framework)
csharpcssvisual-studiohelpquestion
5 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.
  • A Offline
    A Offline
    Allad
    wrote on last edited by
    #1

    Hey, I'm using a property grid control to display some user options for my applications. So, basically I have a big Settings class with all the properties associated with the property grid control and then the user can just change them. However there's a help frame in the property grid control and I'd like to be able to display some help text in there for each property : pretty much as Visual Studio does. Can someone help please? Thanks Allad PS : if you know of an easy and prettier class for options dialogs in C#, I'm all ears.

    ---- Navigator - Your best alternative to Windows Explorer

    P 1 Reply Last reply
    0
    • A Allad

      Hey, I'm using a property grid control to display some user options for my applications. So, basically I have a big Settings class with all the properties associated with the property grid control and then the user can just change them. However there's a help frame in the property grid control and I'd like to be able to display some help text in there for each property : pretty much as Visual Studio does. Can someone help please? Thanks Allad PS : if you know of an easy and prettier class for options dialogs in C#, I'm all ears.

      ---- Navigator - Your best alternative to Windows Explorer

      P Offline
      P Offline
      Phillip M Hoff
      wrote on last edited by
      #2

      You can use the DescriptionAttribute[^] class to set the text of the "help frame" of a property grid. In addition, you can use the CategoryAttribute[^] class to group related properties within the grid. -Phil

      A 1 Reply Last reply
      0
      • P Phillip M Hoff

        You can use the DescriptionAttribute[^] class to set the text of the "help frame" of a property grid. In addition, you can use the CategoryAttribute[^] class to group related properties within the grid. -Phil

        A Offline
        A Offline
        Allad
        wrote on last edited by
        #3

        thanks a lot. It's working perfectly. Is it some kind of hack? It doesn't look like usual C# syntax. Anyway, It is exactly what I'm looking for.

        ---- Navigator - Your best alternative to Windows Explorer

        P 1 Reply Last reply
        0
        • A Allad

          thanks a lot. It's working perfectly. Is it some kind of hack? It doesn't look like usual C# syntax. Anyway, It is exactly what I'm looking for.

          ---- Navigator - Your best alternative to Windows Explorer

          P Offline
          P Offline
          Phillip M Hoff
          wrote on last edited by
          #4

          Nope, no hacks required. It was designed to look that way. :-) It's C# attribute[^] syntax. .NET allows you to attach additional bits of "metadata" to .NET objects (assemblies, classes, methods, and properties). Other .NET objects (such as the PropertyGrid) can then extract that data for their own purposes (such as displaying descriptions of properties). -Phil

          A 1 Reply Last reply
          0
          • P Phillip M Hoff

            Nope, no hacks required. It was designed to look that way. :-) It's C# attribute[^] syntax. .NET allows you to attach additional bits of "metadata" to .NET objects (assemblies, classes, methods, and properties). Other .NET objects (such as the PropertyGrid) can then extract that data for their own purposes (such as displaying descriptions of properties). -Phil

            A Offline
            A Offline
            Allad
            wrote on last edited by
            #5

            Wow. Thumbs Up man. you got to be some kind of C# guru to know all that stuff. Thanks a lot for your time. Now I may sleep with a better conscience.(I don't really like using hack stuff when I can help it). Regards, Allad

            ---- Navigator - Your best alternative to Windows Explorer

            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