문제

In my Winforms application I have a toolstrip which I set it's BackColor property to Black. All is good except the fact that every drop-down button on the toolbar draws its drop down arrow in black, thus makeing it invisible. My question is, how do I change the colour of this arrow? I looked for something useful in the toolstrip renderer but all I could found was ToolStripDropDownBackground. So, how do I make it white, for example? Thanks

도움이 되었습니까?

해결책

Create your own renderer:

public class MyRenderer : ToolStripRenderer {

  protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e) {
    e.ArrowColor = Color.White;
    base.OnRenderArrow(e);
  }

}

To use it, set your ToolStrip control:

toolStrip1.Renderer = new MyRenderer();
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top