tags:

views:

98

answers:

1

By default, a winforms dropdown always extends to the right from the dropdown button / menu item. However, I have a toolbox button (similiar to chrome's options button) which is on the far-right side of the window; when clicked, the default menu would always extend outside of the window.

Are there any built-in ways to make the menu drop left from the dropdown button, or do I have to set the menu's position by hand, and manually show/hide?

Edit: there are 2 situations, where such behaviour is less than optimal:

  • if it's not full-screen, or close to the right end, it will hang out from the app's window; and

  • In a multi-monitor enviornment, it drops down on the next monitor

A: 

IIRC, it actually checks the size of the screen (not the window) and will drop the to the left to avoid going off of the screen. Would that be good enough?

Joel Coehoorn
No, for two situations: 1, if it's not full-screen, or close to the right end, it will hang out from the app's window; and 2, In a multi-monitor enviornment, it drops down on the next monitor.
Silver Dragon