找回密码
 立即注册

QQ登录

只需一步,快速开始

forachange

高级会员

20

主题

63

帖子

1803

积分

高级会员

积分
1803

活字格认证

forachange
高级会员   /  发表于:2014-1-24 12:36  /   查看:4231  /  回复:1
如何在Table的Cell中添加HypertextLink。
例子中,只能往HypertextLinks中添加,不能添加到指定的地方?

// Create a HypertextLink object
    TXTextControl.HypertextLink MyLink =
        new TXTextControl.HypertextLink(
        "Text Control Web Site",
        "http://www.textcontrol.com");
    // Insert the hyperlink into the document
    textControl1.HypertextLinks.Add(MyLink);

1 个回复

倒序浏览
iceman
社区贡献组   /  发表于:2014-1-24 15:38:00
沙发
回复 1楼forachange的帖子

forachange 你好,
可以选通过 select 方法指定当前文本位置,在插入:

  1.         private void addlinkToolStripMenuItem_Click(object sender, EventArgs e)
  2.         {
  3.             TXTextControl.HypertextLink MyLink =new TXTextControl.HypertextLink("Text Control Web Site","http://www.textcontrol.com");
  4.             // Insert the hyperlink into the document

  5.             this.textControl1.Select(2, 0);

  6.             textControl1.HypertextLinks.Add(MyLink);
  7.         }
复制代码
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部