Increase Asp.net prompt popup time
Does anyone know how to increase tooptip timeout on Asp.Net controls? I tried searching for this on the net, but many guys recommend creating your own custom tooltip. But I don't want to do that, I want to use the existing version of Asp.Net/VS. Is there a way to hack this? Maybe in web.config or something like that? Thank.
source to share
I don't know what controls you have, but you can achieve this functionality like this
class testToolTip
{
public string P1
{
get;
set;
}
public string p2
{
get;
set;
}
}
ToolTip toolTip = new ToolTip();
public Form1()
{
InitializeComponent();
List<testToolTip> lstToolTip = new List<testToolTip>();
for (int i = 0; i < 100; i++)
{
testToolTip t = new testToolTip() ;
t.P1 = "Prop " + i.ToString();
t.p2 = "Prop 1" + i.ToString();
lstToolTip.Add(t);
}
dataGridView1.DataSource = lstToolTip;
toolTip.IsBalloon = true;
toolTip.UseAnimation = true;
toolTip.UseFading = true;
}
private void dataGridView1_CellMouseEnter(object sender, DataGridViewCellEventArgs e)
{
Rectangle rect = this.dataGridView1.GetCellDisplayRectangle(e.ColumnIndex, e.RowIndex, true);
toolTip.Show(dataGridView1[e.ColumnIndex, e.RowIndex].Value.ToString(), this, rect.Location.X, rect.Location.Y,1000);
}
source to share
I know this has been answered, but not very good in my opinion.
It depends.
For Windows Forms, I suggest a simple approach using the Form_Load ...
http://msdn.microsoft.com/en-us/library/system.windows.forms.tooltip.autopopdelay%28v=vs.85%29.aspx
For web forms, there is CSS and it worked for me (see version 2) ...
http://www.cssplay.co.uk/menu/tooltips
Simpler than Java and easier to implement, but of course this affects all controls and all their tooltips. Also, it is not timed, which is even better! Microsoft shouldn't assume how long people read!
source to share