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 Controls / April 2005

Tip: Looking for answers? Try searching our database.

EditorAttribute - filter file extensions

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steve C. Orr [MVP, MCSD] - 30 Apr 2005 22:28 GMT
I've created a custom control and I have a FileName property for it.
I've added the EditorAttribute so the little ellipsis button will appear at
design time for the property, which allows the user of the control to
specify a filename.  The code is below and that works great.
But I want to limit the dialog to only show certain file types.  That is, it
should only show files with the file extensions that I specify.  Does
anybody know how to do this?

<EditorAttribute(GetType(System.Windows.Forms.Design.FileNameEditor), _
GetType(System.Drawing.Design.UITypeEditor))> _

Public Property FileName() As String

...
Tim Wilson - 30 Apr 2005 22:45 GMT
You'll probably need to derive a new editor from the FileNameEditor class,
override the InitializeDialog method, and specify the filter information.

Signature

Tim Wilson
.Net Compact Framework MVP

> I've created a custom control and I have a FileName property for it.
> I've added the EditorAttribute so the little ellipsis button will appear at
[quoted text clipped - 10 lines]
>
> ...

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.