Linking UIList or UItree object to multiple edit fields
조회 수: 3 (최근 30일)
이전 댓글 표시
My situation is that I have one listbox or uitree (depending on situations) with a list of possible names. I then have several edit fields. The idea is that the user can click on an edit field, then double click an item on the listbox, which would populate the selected edit field with that name. My issue is that I can't figure out how to get the "last clicked edit field". My thought initially was to create a custom property for the figure so that when I click an edit field, it would store that edit field handle which I could then grab with my list box and populate. However, there doesn't appear to be an "onclick" type callback for edit fields.
So there's my dilemma...how do I know which is the last edit field clicked/entered to, so that my listbox knows which edit field to populate?
Thanks in advance!
댓글 수: 0
답변 (2개)
Harsha Priya Daggubati
2020년 7월 30일
Hi,
I guess for your case you can use 'ValueChangingFcn' callback to get the selected edit field.
Refer to the following link for more details:
댓글 수: 0
Mitchell Tillman
2023년 1월 18일
You could just add one button paired with each edit field. So the user would first select the desired uitreenode, then click the button next to the desired edit field to select which field it gets added to. The nice part is that all buttons could potentially share the same callback code.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!