Loads text in a certain format. The complete contents of a Text Control are replaced.
public DialogResult Load();
public DialogResult Load(StreamType streamType);
public DialogResult Load(StreamType streamType, LoadSettings loadSettings);
public void Load(string path, StreamType streamType);
public void Load(System.IO.FileStream fileStream, StreamType streamType);
public void Load(byte[] binaryData, BinaryStreamType binaryStreamType);
public void Load(string stringData, StringStreamType stringStreamType);
public void Load(string path, StreamType streamType, LoadSettings loadSettings);
public void Load(System.IO.FileStream fileStream, StreamType streamType, LoadSettings loadSettings);
public void Load(byte[] binaryData, BinaryStreamType binaryStreamType, LoadSettings loadSettings);
public void Load(string stringData, StringStreamType stringStreamType, LoadSettings loadSettings);
Parameter | Description |
---|---|
stream |
Specifies one of the Stream |
path | Specifies a file from which the data is loaded. |
file |
Specifies a file from which the data is loaded. The data is loaded from the stream's current position. |
binary |
Specifies a byte array from which the data is loaded. |
string |
Specifies a string from which the data is loaded. |
binary |
Specifies one of the Binary |
string |
Specifies one of the String |
load |
Specifies a Load |
The implementations that open a dialog box return the dialog's result value.
The following example shows how to open a dialog box to select a file and load the text from that file. If no Stream
// load every possible file format
textControl1.Load();
// load a PDF document
textControl1.Load(TXTextControl.StreamType.AdobePDF);
Learn more about the TXText