Why am I unable to set the "UIContextMenu" property of my uicontrol back to "None" using the Property Inspector in MATLAB 6.5 (R13)?
3 ビュー (過去 30 日間)
古いコメントを表示
For example, if I set the "UIContextMenu" property of my pushbutton to some context menu I created using the Menu Editor in GUIDE, and then try going back to "None", I receive the following error in the MATLAB Command Window:
"Exception while setting the value"
The "UIContextMenu" property value in the Property Inspector remains the same.
採用された回答
MathWorks Support Team
2009 年 6 月 27 日
This bug has been fixed for Release 14 SP1 (R14SP1). For previous releases, please read below for any possible workarounds:
This is a bug in MATLAB 6.5 (R13) in the way that GUIDE handles setting property values using Property Inspector. Our development staff is investigating this issue.
Currently, to work around this issue, try setting the "UIContextMenu" property of your uicontrol to [] in the "OpeningFcn". For example:
function test_OpeningFcn(hObject, eventdata, handles, varargin)
handles.output = hObject;
set(handles.pushbutton1,'UIContextMenu',[])
guidata(hObject, handles);
Alternatively, you can also use the following workaround:
1. Create a new context menu in the Menu Editor.
2. From the Property Inspector, set the "UIContextMenu" property to the new context menu.
3. In the Menu Editor, delete the new context menu by highlighting it and then clicking on the trash can icon.
4. In the Property Inspector, you will see the "UIContextMenu" has been reset to "None".
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
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!