一个复选按钮组,怎么在每个复选按钮组上显示不同的提示,按钮个数是不定的!
就是鼠标指在复选按钮上,就出现提示的那种!谢谢!
就是鼠标指在复选按钮上,就出现提示的那种!谢谢!
解决方案 »
- 【求解】 使用搜狗输入法 Ctrl + 空格切换时程序异常退出。
- VS2008导出EXCEL数据包报错
- C#通讯编程(整理)|大家可以进来学习
- 范型迭代器老提示没实现IEnumerable接口方法,我实际上我是实现了啊.
- dbf数据库的问题
- 自定义控件问题 为什么Render方法不能输出write的值
- C#继承机制?
- 如何捕获其他窗口中已知名称的控件值,如textbox的值,点击了哪个button
- c#中请问如何取得相对路径如:工程所在文件夹下一a.txt,如何在程序中调用时,不给出全路径
- 怎么样在TreeView中按Ctrl实现多项选择??
- c# 编写activeX控件无法正常显示
- 如何包装一个程序?
while (ea.MoveNext())
{
if (ea.Current.GetType().Name == "CheckBox")
{
CheckBox cb = (CheckBox)ea.Current;
if (cb.Checked == true)
{
this.toolTip1.SetToolTip(cb, cb.Name);
}
}
}
还有,我怎么找不到toolTip控件
for(int i=0;i<ds.Tables[0].Rows.Count;i++)
{
string str1=ds.Tables[0].Rows[i]["w_p_sense"].ToString().Trim();
string str2=ds.Tables[0].Rows[i]["w_p_word"].ToString().Trim();
CheckBoxList1.Items.Add("<a onmouseover=showMsg('"+str1+"','"+str2+"') onmouseout=hideMsg()>"+str2+"</a>");
CheckBoxList1.Items[i].Value=str2;
}
这是我的代码,str2为复选按钮的内容,str1为提示内容,每个提示内容不一样
foreach ( ListItem i in CheckBoxList1.Items)
{
i.Attributes["title"] ="提示";
}
我说的是webform里面的.
title就是提示的属性.
不明白,我试了下,不行,还是没有提示出现
ds=c_wx.get_wx_word(w_x,sex);
for(int i=0;i<ds.Tables[0].Rows.Count;i++)
{
string str1=ds.Tables[0].Rows[i]["w_p_sense"].ToString().Trim();
string str2=ds.Tables[0].Rows[i]["w_p_word"].ToString().Trim();
CheckBoxList1.Items.Add("<a onmouseover=showMsg('"+str1+"','"+str2+"') onmouseout=hideMsg()>"+str2+"</a>");
CheckBoxList1.Items[i].Value=str2;
foreach ( ListItem l in CheckBoxList1.Items)
{
l.Attributes["title"] =str1;
}
}
这样写还是不行