1

I have a custom-rendered ToolStrip but the menu items are not where I want them to be. How do I move them down within render's code?

You can't change the Bounds property of the items and I don't want to subclass the items

image http://img641.imageshack.us/img641/5431/57405222.gif

Kristina
  • 15,859
  • 29
  • 111
  • 181
  • 1
    I believe the two pixels are for the border. When I was playing with the custom-rendered, I noticed that I could paint outside the Bounds. Have you tried this? Paint a magenta rectange with different bounds. See what you get. – AMissico Mar 07 '10 at 12:22
  • I don't get the problem, why not just change the Rectangle you pass to TextRenderer.DrawText? – Hans Passant Mar 07 '10 at 14:16
  • @nobugz: I believe the way the render calls the paint events prevents the user from doing this. It has been about a year, and I may not remember correctly. I just remember that I gave up, and I am no stranger to custom OnPaint graphics, but this was the first time I used the custom renderer for the tool strip. I would love an answer then I can fix my control. – AMissico Mar 09 '10 at 20:22

0 Answers0