How can I set different Tooltip text for each item in a listbox?

前端 未结 7 1178
情话喂你
情话喂你 2020-12-01 07:57

I have a listbox that is databound to a Collection of objects. The listbox is configured to display an identifier property of each object. I would like to show a tooltip w

7条回答
  •  温柔的废话
    2020-12-01 08:35

    Using title attribute, we can set tool tip for each list items in a list box.

    Loop this for all the items in a list box.

    ListItem li = new ListItem("text","key");
    li.Attributes.Add("title","tool tip text");
    

    Hope this helps.

提交回复
热议问题