如何增加ToolTip显示时间?

the*_*van 9 c# asp.net time tooltip visual-studio-2008

我有一个GridView,在它的RowDataBound事件中,我正在分配ToolTip如下:

protected void gv_RowDataBound(object sender, GridViewRowEventArgs e)
{
    try
    {
        if (gv.HeaderRow != null && e.Row.RowType == DataControlRowType.DataRow)
        {  
            e.Row.ToolTip = "Remarks: " + ((Label)e.Row.FindControl("lblRemarks")).Text;
        }
    }
    catch (Exception ex)
    {
        BussinessLayer.RIBOException.Instance.HandleMe(this, ex);
    }
}
Run Code Online (Sandbox Code Playgroud)

在这里,我想延长ToolTip的显示时间.这该怎么做?

Has*_*gha 5

设置 ToolTipService.ShowDuration 属性。


Bri*_*n S 5

您需要使用ToolTipService特定ShowDuration附加属性.

设置工具提示后,您应该能够执行以下操作:

ToolTipService.ShowDuration(e.Row, 10000)
Run Code Online (Sandbox Code Playgroud)