Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / January 2008

Tip: Looking for answers? Try searching our database.

FileNameEditor: How do I control the returned value?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jeff Johnson - 03 Jan 2008 21:49 GMT
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)
Jeff Johnson - 04 Jan 2008 19:20 GMT
> 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.
Jeff Johnson - 04 Jan 2008 23:27 GMT
>> 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....

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.