c# - tabControlPages remove picture -
try find solution next - on mouseenter - show picture on tabcontrol page , on mouseleave - clear it. done - show pic on tab.
there lot of question refered "how show" picture - this , this or this ant lot of others. use next way - add imagelist , show pic on mouseenter -
private void tabcontrolpages_mouseenter(object sender, eventargs e) { tabpageadd.imageindex = 0; } for removing - try read methods on msdn - have found nothing (maybe not found). variant think, can put in collection transparent icon , change on mouseleave, think it's not perfect solution. if use imagelisticons.images.clear(); - it's clear imagelist - , expected.
so, ther solution avaliable correct way hide/show icon on tab tabcontrol ?
just set imageindex = -1 remove tab icon:
private void tabcontrolpages_mouseleave(object sender, eventargs e) { tabpageadd.imageindex = -1; }
Comments
Post a Comment