//增加文本框
TXTextControl.TextFrame TF = new TXTextControl.TextFrame(200, 200);
textControl1.TextFrames.Add(TF, TXTextControl.HorizontalAlignment.Left, -1, TXTextControl.TextFrameInsertionMode.DisplaceText);
//在文本框中增加图片
if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
TXTextControl.Image NewImage = new TXTextControl.Image();
NewImage.FileName = openFileDialog1.FileName;
NewImage.SaveMode = TXTextControl.ImageSaveMode.SaveAsData;
TXTextControl.TextFrame TF=textControl1.TextFrames.GetItem();
if(TF!=null)
textControl1.TextFrames.GetItem().Images.Add(NewImage, TXTextControl.HorizontalAlignment.Left, -1,
TXTextControl.ImageInsertionMode.DisplaceText);
}
//保存
textControl1.Save(TXTextControl.StreamType.All);
问题
1、在文本框中插入图片保存再加载是空白的。
2、怎么样获取文本框的坐标,想实现从其它地方拖拉一个图片到文本框中 |
|