GUI: Get previous listbox value before change

조회 수: 6 (최근 30일)
CAM
CAM 2015년 3월 24일
댓글: Geoff Hayes 2015년 3월 29일
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
Geoff Hayes
Geoff Hayes 2015년 3월 29일
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?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 App Building에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by