• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 377
  • Last Modified:

Visual Studio Extensibility Property Window

Hi,

I have custom objects that I am developing in my own Visual Studio DSL project.  One of these objects has a property that is a UNC file location.  In runtime mode, when a file is selected I am display the properties for that object in the property window - everything works great.

The problem I am having is that when a user selects an object and the properties are displayed, how can I force the filepath property to show an ellipses in the property window and when the ellipses is clicked to display and OpenFileDialog box?

Thanks!

Neal Jackson
0
njackson60
Asked:
njackson60
1 Solution
 
Bob LearnedCommented:
It sounds like you need the FileNameEditor attribute for your property:

FileNameEditor Class
http://msdn.microsoft.com/en-us/library/system.windows.forms.design.filenameeditor.aspx

[EditorAttribute(typeof(System.Windows.Forms.Design.FileNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
public string testFilename
{
    get { return filename; }
    set { filename = value; }
}
private string filename;
0
 
njackson60Author Commented:
Thank you!  This was THE PERFECT solution.  I appreciate your time.

Neal
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now