文檔半島外圍網(wǎng)上直營>>FastReport中文文檔>>自定義鏈接
                自定義鏈接
使用這種鏈接,您可以定義自己對(duì)鼠標(biāo)點(diǎn)擊的反應(yīng)。為此,請(qǐng)使用對(duì)象的 "Click(單擊)"事件處理程序。具體操作如下
- 選擇對(duì)象并打開 "Properties "窗口;
- 
		單擊 按鈕,顯示對(duì)象的事件; 按鈕,顯示對(duì)象的事件;
- 雙擊 "Click"事件。FastReport 將切換到 "Code "窗口并創(chuàng)建一個(gè)空的事件處理程序。
在處理程序的代碼中,完成您需要的所有操作。您很可能需要處理程序調(diào)用的對(duì)象鏈接和超鏈接的值。使用處理程序的參數(shù) 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交談
QQ交談 在線咨詢
在線咨詢 
                 
                
 渝公網(wǎng)安備
            50010702500608號(hào)
渝公網(wǎng)安備
            50010702500608號(hào)
             
            
 客服熱線
客服熱線