GUI: Get previous listbox value before change

2 ビュー (過去 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 Center および File ExchangeMigrate GUIDE Apps についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by