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. PropertyGrid usage

PropertyGrid usage

Scheduled Pinned Locked Moved C#
csstutorialquestionannouncement
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.
  • R Offline
    R Offline
    rbuchana
    wrote on last edited by
    #1

    As an example I have two categories in a property grid. One is read-only and the other is editable. I use a timer to automatically update the properties in the read-only category, approximately every 100msec. However for the updated values in the read-only category to be displayed properly I have to do a PropertyGrid.Refresh() call. This moves the focus inside the property grid, so if I'm editing an editable property I lose my focus anytime the timer fires. Is there a simple way to work around this?

    D 1 Reply Last reply
    0
    • R rbuchana

      As an example I have two categories in a property grid. One is read-only and the other is editable. I use a timer to automatically update the properties in the read-only category, approximately every 100msec. However for the updated values in the read-only category to be displayed properly I have to do a PropertyGrid.Refresh() call. This moves the focus inside the property grid, so if I'm editing an editable property I lose my focus anytime the timer fires. Is there a simple way to work around this?

      D Offline
      D Offline
      Dr Walt Fair PE
      wrote on last edited by
      #2

      Have you tried using the respective ActiveControl and SetFocus methods?

      CQ de W5ALT

      Walt Fair, Jr., P. E. Comport Computing Specializing in Technical Engineering Software

      R 1 Reply Last reply
      0
      • D Dr Walt Fair PE

        Have you tried using the respective ActiveControl and SetFocus methods?

        CQ de W5ALT

        Walt Fair, Jr., P. E. Comport Computing Specializing in Technical Engineering Software

        R Offline
        R Offline
        rbuchana
        wrote on last edited by
        #3

        Won't the ActiveControl always return the property grid? I'm losing focus within the property grid, not from the property grid.

        D 1 Reply Last reply
        0
        • R rbuchana

          Won't the ActiveControl always return the property grid? I'm losing focus within the property grid, not from the property grid.

          D Offline
          D Offline
          Dr Walt Fair PE
          wrote on last edited by
          #4

          Yeah, you're right. I'm sort of guessing here; I misunderstood your original question. How about the SelectedGridItem property?

          CQ de W5ALT

          Walt Fair, Jr., P. E. Comport Computing Specializing in Technical Engineering Software

          R 1 Reply Last reply
          0
          • D Dr Walt Fair PE

            Yeah, you're right. I'm sort of guessing here; I misunderstood your original question. How about the SelectedGridItem property?

            CQ de W5ALT

            Walt Fair, Jr., P. E. Comport Computing Specializing in Technical Engineering Software

            R Offline
            R Offline
            rbuchana
            wrote on last edited by
            #5

            Yeah tried that. Didn't seem to do what I want.

            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