• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 309
  • 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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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