GUIDE using CreateFcn to set TooltipString?

2 ビュー (過去 30 日間)
Ingo Rück
Ingo Rück 2017 年 10 月 11 日
コメント済み: Jan 2017 年 10 月 11 日
Hello everyone,
simple question, is it possible to change the TooltipString value of a static text in its CreateFcn? I want to display a formula, normally I would do it with following code:
set(handles.statictext,'TooltipString','somewhat longer formula here','Interpreter','latex')
Problem here is that the handles.statictext does not yet exist in its CreateFcn. If I only do:
set('TooltipString','somewhat longer formula here','Interpreter','latex')
it does not work either. Maybe there is a way to set the TooltipString interpreter to latex in the GUI Inspector in GUIDE?
Thanks for your help!
  4 件のコメント
Adam
Adam 2017 年 10 月 11 日
Yeah, I don't think you can do anything fancy with tooltips beyond just setting a string. Even edit boxes and text boxes themselves don't support advanced formatting without resorting to HTML or underlying java objects, as far as I am aware.
Ingo Rück
Ingo Rück 2017 年 10 月 11 日
Not even static textboxes? Damn thats a bummer..

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

採用された回答

ES
ES 2017 年 10 月 11 日
You can do it in OpenFcn! Is there any specific reason, why you do it in CreateFcn?
  3 件のコメント
Ingo Rück
Ingo Rück 2017 年 10 月 11 日
When I try to change it in the OpenFcn I get the same error as above: There is no Interpreter property on the UIControl class.
Does this basically mean that it is impossible to use Latex to put a formula into the Tooltip string?
Jan
Jan 2017 年 10 月 11 日
@Ingo: The error message is clear: There is no interpreter in uicontrol objects. Then you cannot display LaTeX directly in a tooltip string.

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

その他の回答 (0 件)

カテゴリ

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