private void listBox1_SelectedIndexChanged(object sender, System.EventArgs e)
{
if(this.listBox1.SelectedIndices.Count>0)
{
this.toolTip1.Active=true; this.toolTip1.SetToolTip(this.listBox1,this.listBox1.Items[this.listBox1.SelectedIndex].ToString());
}
else
{
this.toolTip1.Active=false;
}
}可以在你选择某一项时提示这一项的内容
{
if(this.listBox1.SelectedIndices.Count>0)
{
this.toolTip1.Active=true; this.toolTip1.SetToolTip(this.listBox1,this.listBox1.Items[this.listBox1.SelectedIndex].ToString());
}
else
{
this.toolTip1.Active=false;
}
}可以在你选择某一项时提示这一项的内容
解决方案 »
- 项目分析与设计
- 如何获取鼠标移动时gridControl相对应的行
- 如何自动添加ToolStripMenuItem项
- 关于C# WinForm DataGridview 样式的问题
- 内存中数据批量更新到数据库
- c# 工具栏的undo、redo按钮的弹出窗口如何实现
- 数据比较的问题。
- Pinvoke传递结构体数组指针
- 请教用firefox为何无法正常打开webhtmleditor?
- WinForm下的DevExpress中ComboxEdit如何绑定key/value值?
- winform中的DataGrid怎么用程序加一个带有 <a href=# onclick="reply(i);">回复</a> 的模版列?????
- 如何批量生成字符串?〉如:从aa到zzzz
每个控件就会加入tooltip属性
设置text和延迟时间就可以了