PC Review


Reply
Thread Tools Rate Thread

FileNameEditor: How do I control the returned value?

 
 
Jeff Johnson
Guest
Posts: n/a
 
      3rd Jan 2008
I have a need to derive from FileNameEditor to provide the ability to select
multiple files. It's not hard to make the OpenFileDialog function that way
by overriding the InitializeDialog() method, but the problem is that the
RETURN VALUE is still only a single file name. Is there any way to control
this? I thought the answer would lie in overriding ToString(), but that
didn't work. If EditValue() is what I need to use, can comeone please
explain HOW I would use it? The MSDN documentation tells me next to nothing
about this.

Also, before you suggest I use a CollectionEditor, I can't, because the
property I'm associating this with is kind of multi-purpose and needs to be
a string. It could hold any values like

C:\Temp\SomeFile.txt
"C:\Temp\1.dat" "C:\Temp\2.dat" "C:\Temp\3.dat"
C:\Data\*.txt
C:\\Data\\[^.]*\.(dat|csv|txt)


 
Reply With Quote
 
 
 
 
Jeff Johnson
Guest
Posts: n/a
 
      4th Jan 2008
"Jeff Johnson" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...

> If EditValue() is what I need to use, can comeone please explain HOW I
> would use it? The MSDN documentation tells me next to nothing about this.


It appears that EditValue() is the answer. I found a good article at
http://www.devx.com/DevX/Article/20920/0/page/1 and also a decent MSDN code
sample in the docs for the IWindowsFormsEditorService Interface.


 
Reply With Quote
 
Jeff Johnson
Guest
Posts: n/a
 
      5th Jan 2008
"Jeff Johnson" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...

>> If EditValue() is what I need to use, can comeone please explain HOW I
>> would use it? The MSDN documentation tells me next to nothing about this.

>
> It appears that EditValue() is the answer. I found a good article at
> http://www.devx.com/DevX/Article/20920/0/page/1 and also a decent MSDN
> code sample in the docs for the IWindowsFormsEditorService Interface.


Note to self: next time just use Reflector and disassemble a Framework class
to see how Microsoft did it....


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FileNameEditor cannot create a new file cnathaide@yahoo.com Microsoft Dot NET Framework Forms 0 20th Jan 2006 04:18 PM
Re: Problem with System.Windows.Forms.Design.FileNameEditor Polo Microsoft C# .NET 0 27th Jun 2005 10:03 AM
Problem with System.Windows.Forms.Design.FileNameEditor Polo Microsoft C# .NET 2 23rd Jun 2005 09:31 AM
where is FileNameEditor? =?Utf-8?B?RmVpIExp?= Microsoft C# .NET 2 15th Dec 2004 06:25 PM
FileNameEditor Thomas Wilbrandt Microsoft Dot NET Framework 1 14th Aug 2003 09:23 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:44 PM.