Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
620
MSWord like undo redo toolbar button
posted

Hi,

 

What would the easiest way to implement a MSWord like undo redo toolbar button (including dropwdown menu, items multiselection and dynamic label at the bottom). See http://www.codeproject.com/KB/miscctrl/UndoHistoryPopup/UndoDemo_screenshot.gif for sample using version 8.1.

 Thanks in advance

Parents
No Data
Reply
  • 44743
    Verified Answer
    posted

    You could use a PopupGalleryTool. Set MaxDropDownColumns to 1. Then add a gallery tool item for each undo item to the Items collection of the gallery. This will give you the items in the list with the scrollbar. Then add a LabelTool to the Tools collection of the gallery to display how many items will be undone. You can handle the toolbars manager's GalleryToolActiveItemChange event to know when the user mouses over another item. The only issue you will have is that only one item in a gallery can be active or appear selected, so you will need to iterate over all Items in the gallery before the active item and change their appearance to appear selected as well. Also, if this gallery will appear in a ribbon group, set ShowPreviewInRibbon to False on the gallery.

Children
No Data