Windows Form control property issue
-
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 :)
-
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 :)
What you're looking for is a custom PropertyEditor. Read up on it here[^].
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
What you're looking for is a custom PropertyEditor. Read up on it here[^].
A guide to posting questions on CodeProject[^]
Dave KreskowiakThanks :-D
-
Thanks :-D
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; } }