下拉菜单的工具提示 [英] Tool tip for Dropdown

查看:72
本文介绍了下拉菜单的工具提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何设置下拉菜单控件的工具提示.给出一些示例

How set the tooltip for Dropdown control ..give some examples

推荐答案

数据绑定后
您可以循环所有列表项并添加标题属性.
After databinding
you can loop all listitems and add title attribute.
foreach (ListItem item in cmb.Items)
            {
                item.Attributes.Add("Title", item.Text);
            }










public string ToolTip
    {
        get { EnsureChildControls(); return ddl.ToolTip; }
        set { EnsureChildControls(); ddl.ToolTip = value; }
    }







ad this code on code behind and set tooltip property in page load
ToolTip= "select country"



其中ddl是下拉列表的名称

幸福的编码



where ddl is the name of the dropdown list

happy coding


希望 [ ^ ]可能会对您有所帮助.
Hope this[^] might help you.


这篇关于下拉菜单的工具提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆