I'm having a problem trying to get a customised OpenFileDialog() to fulfil my requirements.
The code for this custom-built dialog has been taken from another site (http://www.codeproject.com/KB/dialog...gExtender.aspx) ) and allows the user to select the
viewing method before opening the dialog to show a file directory.
The following event is assigned to a button on my form which, when prompted, displays the dialog.
Expand|Select|Wrap|Line Numbers
- public void ShowOpenDialog(object sender, System.EventArgs e)
- {
- new OpenFileDialog().ShowDialog();
- }
following method:
Expand|Select|Wrap|Line Numbers
- public void SelectedIndexChanged(object sender, System.EventArgs e)
- {
- _extender.DialogViewType = (FileDialogExtender.DialogViewTypes)_cmbViewType.SelectedItem;
- }
a) Do this by default
b) Create an instance of OpenFileDialog and use its properties e.g. .FileName
b) Allow me to assign the name of the file, selected by the user, to an instance variable.
If you could give me guidance with one or any of these issues, that would be appreciated.
If you would like me to show more code, please let me know.
Thanks
Matt.