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
Post a Comment