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. Windows Form control property issue

Windows Form control property issue

Scheduled Pinned Locked Moved C#
csharpvisual-studiohelp
4 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.
  • V Offline
    V Offline
    venomation
    wrote on last edited by
    #1

    I need to have one of my properties in a custom control to open the "open file dialogue" window when selected. I have googled around but it keeps throwing me .net controls! At present I have a property and when "set" opens the dialogue, but this forces me to enter some text and open it only when deselected... Just to clarify: 1: Click on the property name in visual studio designer property area 2: it opens the open file dialogue Thanks :)

    D 1 Reply Last reply
    0
    • V venomation

      I need to have one of my properties in a custom control to open the "open file dialogue" window when selected. I have googled around but it keeps throwing me .net controls! At present I have a property and when "set" opens the dialogue, but this forces me to enter some text and open it only when deselected... Just to clarify: 1: Click on the property name in visual studio designer property area 2: it opens the open file dialogue Thanks :)

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      What you're looking for is a custom PropertyEditor. Read up on it here[^].

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak

      V 1 Reply Last reply
      0
      • D Dave Kreskowiak

        What you're looking for is a custom PropertyEditor. Read up on it here[^].

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak

        V Offline
        V Offline
        venomation
        wrote on last edited by
        #3

        Thanks :-D

        M 1 Reply Last reply
        0
        • V venomation

          Thanks :-D

          M Offline
          M Offline
          mahendren
          wrote on last edited by
          #4

          There is a built-in FileNameEditor which you can use as well. [EditorAttribute(typeof(System.Windows.Forms.Design.FileNameEditor), typeof(System.Drawing.Design.UITypeEditor))] public string FileName { get { return _FileName; } set { _FileName = value; } }

          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