Friday, 27 September 2013

Reorder toolStrip items within the same toolStrip without holding the ALT Key pressed in C# VS 2008

Reorder toolStrip items within the same toolStrip without holding the ALT
Key pressed in C# VS 2008

I have a toolStrip1 placed on a Form (System.Windows.Forms) in C# and
added five toolStrip buttons to it. Now I wonder how to let the user
reorder these buttons by dragging them on another positions within the
toolStrip1. I set the toolStrip1.AllowItemReorder to true and the
AllowDrop to false as Microsoft in an article suggests.
Now shall be enabled automatic handling of item reorder in the toolStrip1.
But it doesn't work - only if I hold ALT-Key pressed the toolStrip1 reacts
to the reordering attempts by the user. Have I really to handle the
DragEvent, DragEnter, DragLeave myself to avoid holding the Alt Key during
reordering the items?
If it so, please give me an example how this events would look like on a
toolStrip with toolStripButtons, if I wish to drag the one item on a
different position within the toolStrip1 without holding any ALT Keys
(like Internet Explorer Favorites does).

No comments:

Post a Comment