The Sample Program

The sample program has only one menu item, which is Open File.... Looking at the source code reveals nothing unusual: The main difference to the Open File routine in other Text Control sample programs is the Load method being called with the StreamType value XMLFormat as a parameter, so that the Open File dialog box will only display XML files:

[C#]
private void mnuFile_Open_Click(object sender, System.EventArgs e)
{
    textControl1.Load(TXTextControl.StreamType.XMLFormat);
}
[Visual Basic]
Private Sub mnuFile_Open_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles mnuFile_Open.Click
    TextControl1.Load(TXTextControl.StreamType.XMLFormat)
End Sub
[Delphi]
proedure TWinForm1.mnuFile_Open_Click(sender: System.Object;
    e: System.EventArgs);
begin
    TextControl1.Load(TXTextControl.StreamType.XMLFormat);
end;

There is quite a bit happeing behind the scenes, however. If you load the TestFile.xml sample file, Text Control will not only load the xml file, but will

Let us take a closer look at the 3 files involved.

Next >>