uicontextmenu not rendering reliably

1 回表示 (過去 30 日間)
Jim Hokanson
Jim Hokanson 2017 年 12 月 8 日
I'm manually showing a uicontextmenu in response to a button press:
%In the button press callback ...
p = getpixelposition(current_button);
set(obj.context_menu,'Visible','on','Position',p(1:2))
However, the context menu does not show up every time I press the button. I have multiple buttons and after I press a couple it seems to show up every time. Also, it shows up reliably for some buttons and rarely for other buttons (until I press the more reliable buttons). Adding drawnow() seems to help ...
My question is, is anyone aware of issues associated with the uicontextmenu rendering? Are there known workarounds to get reliable rendering? Is drawnow() an intended solution? If so, why?
I'm running Mac OS Sierra with 2017a.

回答 (0 件)

カテゴリ

Help Center および File ExchangeInteractive Control and Callbacks についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by