undo-redo for listview

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jay

    #1

    undo-redo for listview

    I need to implement an undo and redo for an entire row in a listview
    containing approximately 10 columns. I'm not sure of the best way to
    implement this. The only thing that I've thought of is a stack
    implementation. I need to be able to undo a delete, an insert (add), a
    movement within the list

    Any ideas?

    Thank you and any ideas would be appreciated.




  • Auric__

    #2
    Re: undo-redo for listview

    On Sat, 11 Oct 2003 14:16:33 GMT, "Jay" <jayfischer91@h otmail.com>
    wrote:
    [color=blue]
    >I need to implement an undo and redo for an entire row in a listview
    >containing approximately 10 columns. I'm not sure of the best way to
    >implement this. The only thing that I've thought of is a stack
    >implementation . I need to be able to undo a delete, an insert (add), a
    >movement within the list
    >
    >Any ideas?
    >
    >Thank you and any ideas would be appreciated.[/color]

    Just my $.02...

    I've never implemented a real undo/redo sort of thing myself, but
    here's something I *have* done that might give you some ideas - it's
    (sort of) an undo/redo for navigating a series of images. I use two
    arrays, one called prevPic() and one called nextPic(). prevPic() is
    the undo stack - every time an image is selected, I do this:
    ReDim Preserve prevPic(UBound( prevPic) + 1)
    prevPic(UBound( prevPic)) = thisPic

    (thisPic is a numerical index for another array that holds all the
    image names.) To undo, I just step backwards through this array. When
    an action is undone, it's pushed onto the nextPic() array in a similar
    manner, so redoing is just a matter of stepping through that array.
    --
    auric "underscore " "underscore " "at" hotmail "dot" com
    *****
    On leave from CNN...

    Comment

    Working...