如何设置HeaderFooter为ReadOnly?
如题,谢谢 回复 1楼mindrayguowei的帖子可以通过 e.HeaderFooter.Deactivate(); 实现,测试代码如下:
private void textControl1_HeaderFooterActivated(object sender, TXTextControl.HeaderFooterEventArgs e)
{
e.HeaderFooter.Deactivate();
}
private void Form1_Load(object sender, EventArgs e)
{
TXTextControl.Section currentSection = textControl1.Sections.GetItem();
TXTextControl.HeaderFooter currentHeader =
currentSection.HeadersAndFooters.GetItem(TXTextControl.HeaderFooterType.Header);
if (currentHeader == null)
{
currentSection.HeadersAndFooters.Add(TXTextControl.HeaderFooterType.Header);
currentHeader = currentSection.HeadersAndFooters.GetItem(TXTextControl.HeaderFooterType.Header);
}
currentHeader.Selection.Text = "This is a header with an image aligned to the right.";
}
不好意思,不只是HeaderFooter需要只读,MainText里面某些字段以及表格中某些cell的值也需要只读 这里有一篇博客,给出了如何设置TX中部分区域为只读的方法,请参考。
如何控制文档中部分区域为只读模式 回复 3楼mindrayguowei的帖子
为了给你提供更优质的服务,请对本次服务进行评分。我们会认真对待你提出的宝贵意见,谢谢
http://gcdn.gcpowertools.com.cn/attachment.aspx?attachmentid=10062
页:
[1]