c# - Can I get a MouseOver event to show small dialog box for an item in the ListViewControl? -


[edit] - see edit below, think i've figure out!

i similar thing => how make floating (tooltip) control in windows.forms? wondering if there better way now? have tried approach window seems hang around , i'm having issues generally.

i know how make tooltips form controls (here) items in listview don't seem obvious.

for particular usage, have list of items in listview control. love if on itemmousehover little yellow tooltip box used show info or bit of text related item in question.

i've created tooltip (i think) , doesn't fire. i'm getting event not tool tip. i'm not doing correctly. tried variations on below seem fail miserably.

private void showlittlebox(object sender, listviewitemmousehovereventargs e) {     tooltip1 = new tooltip     {tooltiptitle = "file summary",automaticdelay = 10,backcolor = color.yellow};     richtextbox rtb = new richtextbox //i needed window - used lot of them     {autosize = true,visible = true,text="please note, first 5 lines shown"};      string mytextderivedfromobject = "eventually dynamic ... ";     tooltip1.show(mytextderivedfromobject,rtb); //also tried activewindow, listview control etc.  } 

needless say, i've been on "swing-set" 4 hours give or take , need little push ...

[edit]: think cracked - found listview contains separate property allowing each item have it's own tooltip. listviewitem.tooltiptext property in end, had set true , add items tooltip text when build it.

i did same thing this, put panel label control on form , false visible property of panel , on mouseenter event of object x,y position , show panel @ position.

point locationonform = anyobject.findform().pointtoclient(anyobject.parent.pointtoscreen(anyobject.location)); lblque.text = "text shown"; panel8.location = new point(locationonform.x, locationonform.y+27); panel8.size = new size(470, 30); panel8.backcolor = color.skyblue; this.controls.add(panel8); panel8.bringtofront(); panel8.show(); 

hope helps.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -