在保存文件对话框中指定过滤器 [英] specifying filters in save file dialog box
本文介绍了在保存文件对话框中指定过滤器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我用C#为HTML和CSS创建一个IDE,因此我想向我的保存文件对话框中添加一个过滤器,然后打开文件对话框,该对话框仅显示.css和.html文件,默认情况下将文件另存为.html
Iam creating an IDE in C# for HTML and css thus I want to add a filter to my save file dialog box and open file dialog box which will show only .css and .html files aand by default save a file as .html
推荐答案
saveFileDialog1.Filter ="CSS文件(* .css)| * .css | HTML文件(* .html)| * .html" ;;
saveFileDialog1.FilterIndex = 2;
saveFileDialog1.Filter = "CSS Files (*.css)|*.css|HTML Files (*.html)|*.html";
saveFileDialog1.FilterIndex = 2;
这篇关于在保存文件对话框中指定过滤器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文