Possible to set a tooltip for each option of a popupmenu?

5 ビュー (過去 30 日間)
geomod
geomod 2011 年 9 月 3 日
I could not find whether this is possible or not, so I direct myself to the specialists here...
Thanks

採用された回答

Fangjun Jiang
Fangjun Jiang 2011 年 9 月 3 日
A not-too-bad workaround is to change the tooltipstring of the pop-up menu dynamically in the function callback of the pop-up menu.
  4 件のコメント
Fangjun Jiang
Fangjun Jiang 2011 年 9 月 4 日
Sorry, geonod! What I did before was changing the tooltipstring on a Listbox, not a pop-up menu. On the Listbox, the effect is almost as desired. After trying on a pop-up menu, the effect is less desirable.
What version of MATLAB are you using? I am using R2007b now and its GUI doesn't support many of the eventdata that are available in the new version of MATLAB. I might need some time to try out the new version and then report back.
geomod
geomod 2011 年 9 月 4 日
No problem Fangjun. I decided to set the tooltip differently. See comments below. Now the combi tooltip-axes is the challenge...

サインインしてコメントする。

その他の回答 (2 件)

Yair Altman
Yair Altman 2011 年 9 月 10 日
Setting item-specific tooltips is not very difficult, using just a tiny bit of undocumented magic powder. Take a look here: http://UndocumentedMatlab.com/blog/setting-listbox-mouse-actions/
  1 件のコメント
geomod
geomod 2011 年 9 月 19 日
Thanks for this comment!

サインインしてコメントする。


Walter Roberson
Walter Roberson 2011 年 9 月 3 日
There is only one tooltip per object, and the individual options of uicontrol popupmenus are not distinct objects.
Something might be possible at the Java level; I don't know.
  7 件のコメント
Walter Roberson
Walter Roberson 2011 年 9 月 4 日
All of the Window* functions work only at the figure level.
To program your own tooltip function using WindowButtonMotionFcn, you should have the callback start or reset a timer. As long as there is motion, the timer callback will be postponed. When the timer callback goes off, it will be because the use has stopped moving the cursor. In the timer callback, check the figure PointerLocation, and if it is in an appropriate place, use helpdlg() or a similar function to pop up the help information.
geomod
geomod 2011 年 9 月 5 日
OK, thank you Walter. I try to get on with it.

サインインしてコメントする。

カテゴリ

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