Strange Push Button Issue
8 ビュー (過去 30 日間)
古いコメントを表示
I have written several pieces of GUI code which all run quite well.
The only issue, and it is mostly a "maddening" issue more than a functional issue, is that I always seem to need to press the push button on my dialog boxes twice before they execute. It doesn't matter if the program is large or small - the button seems to be unresponsive until I press it a second time.
None of my other controls have this issue.
Does anyone have any suggestions? Thank you.
2 件のコメント
Geoff Hayes
2014 年 10 月 3 日
Kevin - what are the other types of widgets on your GUI - edit text boxes, uitables, or ..? And by dialog boxes, do you mean actual dialogs outside of your GUI, or just push buttons within the GUI? Have you put breakpoints in the callback for the button to verify that it is only on the second press that it is being called?
A recent question at pushbutton callback function reacts only after second press discussed a similar issue that seemed to occur only when the user pressed the button after editing/selecting a cell in the uitable. I couldn't reproduce the problem (R2014a, OS X 10.8.5) but others could and had seen the problem before.
回答 (1 件)
Image Analyst
2014 年 10 月 3 日
I've seen this before when my user is in a uitable, editing it, and clicks the OK button to accept the table as is. For some reason they have to click twice. It seems like all the first click does is to change focus away from the table (take it out of editing mode), and it needs another click to actually do the pushbutton callback. I don't know why. It's been talked about before and I don't recall any workaround. I feel your pain.
参考
カテゴリ
Help Center および File Exchange で Interactive Control and Callbacks についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!