Opening a file is working as expected but I would like that file name (or even the entire path) to be displayed in the main window title bar.
I can’t find any info on how this is done but I think it would have to happen somewhere in the OpenDialog?? code as posted:
[code] Dim dlg As OpenDialog
Dim f As FolderItem
dlg = New OpenDialog
dlg.Filter = FileTypes1.All //Restrict file types
f = dlg.ShowModal
If f <> Nil Then
If f.Exists Then
Dim dataInput As TextInputStream
Try
dataInput = TextInputStream.Open(f)
tempArray() = Split(dataInput.ReadAll,EndOfLine) //(Encodings.ASCII)
dataInput.Close
Catch e As IOException
MsgBox("Error accessing file.")
End Try
End If
EvaluateImportedData
End If
WindowMain.Title = CurrentFileName // THIS IS WHERE IT NEEDS TO HAPPEN [/code]
[quote=313682:@Emile Schwarz]The line above restrict nothing. Test for yourself: drop a file whose extension (type) is not in your list (in FileTypes1).
Emile, the “line above” does work in that it ONLY allows for *.txt files to be shown as per my specs in FileTypes1.
Yes, I’ve seen the xDevLibrary and have downloaded one of Eugene Dakins e-books (the Canvas one). I usually prefer “physical” books - I tend to learn more that way.