我是靠谱客的博主 大胆花生,这篇文章主要介绍matlab figure 焦点,matlab – 将焦点设置为uifigure窗口,现在分享给大家,希望可以做个参考。

在将焦点切换为不同的图形后,如何将焦点设置为uifigure?

对于uicontrol,可以将焦点设置在其子元素之一上.例如:

% create a new uicontrol text label

h = uicontrol('style','text','string','This is my figure');

% create a figure to switch the focus

figure;

% switch back

uicontrol(h)

但是,对于uifigure,采用类似的代码只会创建一个新的uifigure.

一些代码供您尝试:

% create a new uifigure

h = uifigure('Name','This is my figure');

% create a new uilabel as a child of uifigure

lh = uilabel(h)

% create a figure to switch the focus

figure;

% this creates a new uifigure then switch back

uifigure(h)

% this creates an error as the first input argument must be a valid parent for uilabel

uilabel(lh)

任何想法,见解或贡献都表示赞赏.

请注意,您的Matlab版本应至少为2016a,因为这是在引入uifigure时.

最后

以上就是大胆花生最近收集整理的关于matlab figure 焦点,matlab – 将焦点设置为uifigure窗口的全部内容,更多相关matlab内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(114)

评论列表共有 0 条评论

立即
投稿
返回
顶部