MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   资料存档 (https://www.labfans.com/bbs/forumdisplay.php?f=72)
-   -   有没有办法更改MATLAB Command Window的标题? (https://www.labfans.com/bbs/showthread.php?t=23000)

poster 2019-12-10 16:49

有没有办法更改MATLAB Command Window的标题?
 
我正在使用C ++ API来启动MATLAB(通过engOpenSingleUse)。一切正常。但是我想将窗口的标题从“ MATLAB Command Window”更改为其他名称。

我经常打开其中的4或5个程序,如果我的程序崩溃,则偶尔会有一个变得孤立。如果我可以更改标题,则最好知道哪个是哪个。

是否有我可以执行的MATLAB命令(通过engEvalString)可以做到这一点?


回答:
对于Matlab 7:

jDesktop = com.mathworks.mde.desk.MLDesktop.getInstance; jDesktop.getMainFrame.setTitle('my new title'); *或专门用于命令窗口:

cmdWin = jDesktop.getClient('Command Window'); cmdWin.getTopLevelAncestor.setTitle('my new title'); 对于Matlab 6:

jDesktop = com.mathworks.ide.desktop.MLDesktop.getMLDesktop; jDesktop.getMainFrame.setTitle('my new title'); *或用于命令窗口:

cmdWin = jDesktop.getClient('Command Window'); cmdWin.getTopLevelWindow.setTitle('my new title');
其他相关的未记录桌面功能在此处进行了描述:
[URL]http://undocumentedmatlab.com/blog/tag/desktop/[/URL]



[url=https://stackoverflow.com/questions/1924286]更多&回答...[/url]


所有时间均为北京时间。现在的时间是 01:26

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.