Question

I am developing a windows forms application with C#

My main form has a toolstrip with a ToolStripSplitButton which is aligned to the right. When the split button is clicked, its menu displays over the edge of the form, unless, the form is too close to the far right hand side of the screen.

I have played with various properties to try and solve this, but without much luck!

Is there anything (maybe even a DllImport), that can force the button's menu to always fold in and towards the form, and never exceed the forms bounds?

Était-ce utile?

La solution

As worked out in the comments on the OP, if you don't use images in the sub-items of the ToolStripSplitButton, this is an easy solution:

1) Set the RightToLeft property of the ToolStripSplitButton itself to Yes

2) Set the RightToLeft property of all sub-items to No to align the text correctly.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top