GUI: Get previous listbox value before change

2 Ansichten (letzte 30 Tage)
CAM
CAM am 24 Mär. 2015
Kommentiert: Geoff Hayes am 29 Mär. 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 Kommentar
Geoff Hayes
Geoff Hayes am 29 Mär. 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?

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu App Building finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by