GUI: Get previous listbox value before change

1 view (last 30 days)
CAM
CAM on 24 Mar 2015
Commented: Geoff Hayes on 29 Mar 2015
In VBA, there is an object-action called BeforeUpdate, where you can run code before a value is permanently changed. For example: You would use it to verify that the user really wants to delete an entry before it actually gets deleted (and cancel the delete if need be).
Is there a way to capture the "previous" value of a listbox when the user selects the new value before it is "officially" changed? Web searches have come up empty.
I am guessing that one way to do this may be to store the value in the listbox's UserData property, then update it at the end of the listbox callback that runs when the user makes the new selection. Is there any functionality that I am missing?
I am running Matlab R2014b.
Thanks in advance!
  1 Comment
Geoff Hayes
Geoff Hayes on 29 Mar 2015
CAM - please describe how you are allowing the user to change or delete an element from the list box. Does he/she select an item in the list, enter some new text in an edit text box, and then press a button to change the value?

Sign in to comment.

Answers (0)

Categories

Find more on Environment and Settings in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!