Application.OpenDocument event

From Xojo Documentation


Application.OpenDocument(item as FolderItem)

Supported for all project types and targets.

The user has double-clicked on a document whose creator matches the application’s creator or the OpenDocument method was called.

Sample Code

This code loads the text of the supplied file into a TextArea on Window1:

If item <> Nil Then
Dim input As TextInputStream
input = TextInputStream.Open(item)

Dim w As New Window1
w.TextArea1.Text = input.ReadAll

End If