vb.net - Set Panel backcolor when hover -
vb.net - Set Panel backcolor when hover -
i'm creating panel
labels
, pictureboxes
in programitacally.
what want it, whenever mouse hovers panel
panel
backcolor set steelblue , whenever mouseleave occurs, backcolor sets transparent
my problem is, whenever hover child of panel
such label
or picturebox
lose backcolor, because code considers mouseleave event of panel
.
therefore, have tried function whenever hover kid of panel
set panel
backcolor steelblue.
now problem is, backcolor flickers because whenever hover label
or picturebox
considers mouseleave event of panel
how create backcolor of panel
remain same until leave panel
boundaries?
i don't know of easy way of doing this. best way create new command inherits panel control. if that, can override onmouseleave
method, this:
protected overrides sub onmouseleave(e eventargs) if not me.clientrectangle.contains(me.pointtoclient(control.mouseposition)) mybase.onmouseleave(e) end if end sub
vb.net vb.net-2010
Comments
Post a Comment