Restricting File Formats

By default, the Load and Save methods will display all file formats Text Control supports. If you wish to support a subset of these formats, or if you have a version of Text Control that does not support all of the formats, you can specify the formats to be displayed as a parameter. Several members of Text Control's StreamType enumeration can be combined to, for instance, only support HTML and RTF:

[C#]
private void mnuFile_OpenFile_Click(object sender, 
    System.EventArgs e)
{
    textControl1.Load(TXTextControl.StreamType.HTMLFormat |
                        TXTextControl.StreamType.RichTextFormat);
}
[Visual Basic]
Private Sub mnuFile_OpenFile_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles mnuFile_OpenFile.Click
    TextControl1.Load(TXTextControl.StreamType.HTMLFormat + _
                        TXTextControl.StreamType.RichTextFormat)
End Sub

<< Previous Next >>