hr5204562 你好
请参考以下代码:
- private void Form1_Load(object sender, EventArgs e)
- {
- textControl1.ResetContents();
- TXTextControl.TextFrame frame = new TXTextControl.TextFrame(new Size(2000, 2000));
- frame.ID = 1000;
-
- textControl1.TextFrames.Add(frame, new Point(0, 0), textControl1.InputPosition.TextPosition, TXTextControl.TextFrameInsertionMode.AboveTheText);
-
-
- }
- private void loadToolStripMenuItem_Click(object sender, EventArgs e)
- {
- TXTextControl.TextFrame frame = textControl1.TextFrames.GetItem(1000);
- frame.Activate();
- frame.Selection.Load("测试文本", TXTextControl.StringStreamType.PlainText);
- }
复制代码 |