简体   繁体   English

Adobe Air-更改应用程序窗口的元标题

[英]Adobe Air - Change app window meta title

Is it possible to change the meta title text that is display in an Adobe Air desktop app header? 是否可以更改显示在Adobe Air桌面应用程序标题中的元标题文本? (Where by default is the app name displayed) (默认情况下显示的是应用名称

Thanks. 谢谢。 Uli 乌里

Sure: 当然:

protected function initWindowName(event:Event):void 
{
    stage.nativeWindow.title = "new name";
}

And listen to an event such as: 并听一个事件,例如:

addEventListener(Event.ACTIVATE, initWindowName);

If you want to change it at runtime follow davivid's answer. 如果要在运行时进行更改,请遵循davivid的回答。 This is useful if you want to update the header to display the current file name the user is working with or something like that. 如果您想更新标题以显示用户正在使用的当前文件名或类似名称,这将很有用。

If you want to set the title once and not change it, or set a default, change the title tag in the application descriptor xml. 如果要设置一次标题而不更改它,或者设置默认值,请在应用程序描述符xml中更改标题标签。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM