Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Implement Undo method

Implement Undo method

Scheduled Pinned Locked Moved Visual Basic
question
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Pasan148
    wrote on last edited by
    #1

    I have use Text box to my project and i want to implement Undo method of the textbox. When i check CanUndo property of the textbox it always return false. somebody tell me how can i enable undo method to my textbox.

    D 1 Reply Last reply
    0
    • P Pasan148

      I have use Text box to my project and i want to implement Undo method of the textbox. When i check CanUndo property of the textbox it always return false. somebody tell me how can i enable undo method to my textbox.

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      It helps to read the documentation on the TextBox class. Undo has already been implemented. CanUndo tells you if the last operation the user did in the TextBox can be undone or not. It does NOT enable or disable the Undo functionality of the TextBox. In whatever code you have that lets the user command an undo, you have to check the CanUndo property of the TextBox and then, if true, call the Undo method of the TextBox. You would also look into calling the ClearUndo method if appropriate in your situation.

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007, 2008
      But no longer in 2009...

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups