c# - What does ToolStripProfessionalRenderer.OnRenderItemBackground do? -


i writing custom toolstripprofessionalrenderer component , working through of onrender... overrides.

this 1 in particular has stumped me: onrenderitembackground

i can't see drawing anything, force draw i've done this:

protected override void onrenderitembackground(toolstripitemrendereventargs e) {     e.graphics.fillrectangle(brushes.red, e.item.contentrectangle); } 

...but don't see red rectangles, not sure it's doing!?

all stock toolstripitems can add designer render own background. draw onrenderitembackground() override over-painted again. professionaltoolstriprender doesn't override method since nothing needs done. base class method, toolstriprender.onrenderitembackground(), doesn't either.

note onrenderbuttonbackground(), onrenderdropdownbuttonbackground(), onrenderlabelbackground(), etcetera.


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -