Hi, I have a very simple OpenFileDialog method which filters filetypes. Only problem, it's not working. I'm not sure if it's me or mono - I've only done this once or twice before (I don't normally give people the choice of the file to load ;-p), so I'm not going to guess the error...
private void BrowseButton_Click(object sender, EventArgs e)
{
OpenFileDialog fdlg = new OpenFileDialog();
fdlg.Title = "Open File Dialog";
fdlg.InitialDirectory = @"C:\ ";
fdlg.Filter = "Text files (*.txt)|.txt|All files (*.*)|*.*";
fdlg.FilterIndex = 1;
fdlg.RestoreDirectory = true;
if (fdlg.ShowDialog() == DialogResult.OK)
{
textBox1.Text = fdlg.FileName;
}
}
Show all files works, but .txt doesn't.
Is this me or mono?
TTFN
Paul
--
Sie können mich aufreizen und wirklich heiß machen!
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Mono-winforms-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-winforms-list
