文档半岛外围网上直营>>FastReport中文文档>>自定义链接
自定义链接
使用这种链接,您可以定义自己对鼠标点击的反应。为此,请使用对象的 "Click(单击)"事件处理程序。具体操作如下
- 选择对象并打开 "Properties "窗口;
-
单击
按钮,显示对象的事件;
- 双击 "Click"事件。FastReport 将切换到 "Code "窗口并创建一个空的事件处理程序。
在处理程序的代码中,完成您需要的所有操作。您很可能需要处理程序调用的对象链接和超链接的值。使用处理程序的参数 sender:
private void Text2_Click(object sender, EventArgs e)
{
// sender - this is the object which was clicked.
// In order to receive the value of the hyperlink, you need
// to cast the sender to ReportComponentBase type.
object hyperlinkValue = (sender as ReportComponentBase).Hyperlink.Value;
MessageBox.Show("Hyperlink value = " + hyperlinkValue.ToString());
}

按钮,显示对象的事件;
QQ交谈
在线咨询

渝公网安备
50010702500608号

客服热线