因为窗体大小限制,不能让combobox自动适应大小;
我想让鼠标放在combobox上时,出来提示,显示该条数据的所有内容,就像web的toolip一样,
网上搜 了下,说是combobox有个hint,但是这个是delphi的请问,在c#里面这种情况该怎么办?
我想让鼠标放在combobox上时,出来提示,显示该条数据的所有内容,就像web的toolip一样,
网上搜 了下,说是combobox有个hint,但是这个是delphi的请问,在c#里面这种情况该怎么办?
{
ToolTip ttTip = new ToolTip();
ttTip.SetToolTip(comboBox1, comboBox1.Text);
ttTip.ToolTipIcon = ToolTipIcon.Info;
ttTip.ForeColor = Color.Blue;
ttTip.BackColor = Color.LightGray;
ttTip.AutoPopDelay = 5000;
}
var x= offsetLeft(This) +20;
var oDivUrgent=document.getElementById("DivTooltip");
var y= offsetTop(This) + This.offsetHeight;
ShowBubbleInchmeal(x, y,oDivUrgent,This.options[This.selectedIndex].text);
}
function select1_onmousemove(This) {
var x= offsetLeft(This) +20;
var y= offsetTop(This) + This.offsetHeight;
var oDivUrgent=document.getElementById("DivTooltip");
ShowBubbleInchmeal(x, y,oDivUrgent,This.options[This.selectedIndex].text);
}this.DropDownList1.Attributes.Add("onmouseover", "select1_onmousemovetop(this);");
this.DropDownList1.Attributes.Add("onmouseout", "select1_onmouseout();");
{
oTipBubbleDIV.style.display="";
oTipBubbleDIV.style.zIndex=999;
oTipBubbleDIV.style.left =x;
oTipBubbleDIV.style.top = y;
if(text!="" && text!=undefined)
oTipBubbleDIV.innerText=text;
}