[英]AIR: How to set NativeWindow type to Utility
The nativeWindow supports systemChrome (standard,none) and transparent (false,true); nativeWindow支持systemChrome(标准,无)和透明(false,true); These options are in the Adobe AIR Application Descriptor File (xml)
这些选项位于Adobe AIR应用程序描述符文件(xml)中
<!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
<!-- <systemChrome></systemChrome> -->
<!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
<!-- <transparent></transparent> -->
But I can't find the option to set the window type (utility,normal,lightweight) as seen on the TourDeFlex under Air Applications -> AIR APIs and Techniques -> Native Windows. 但是我找不到设置窗口类型(实用,正常,轻量)的选项,如在TourDeFlex的“空中应用程序-> AIR API和技术->本机Windows”下所见。
From the application can be accessed just as a read-only property. 可以作为只读属性从应用程序访问。
Where's the right place to set this property? 设置此属性的正确位置在哪里?
A good example of usage could be: minitask.org 用法的一个很好的例子是:minitask.org
Thanks! 谢谢!
Edit: The window should start in the UTILITY mode 编辑:窗口应以UTILITY模式启动
You may not be able to do this with a main application window. 您可能无法在主应用程序窗口中执行此操作。 A trick you could use is:
您可以使用的技巧是:
function MainConstructor() {
var opt:NativeWindowInitOptions = new NativeWindowInitOptions();
opt.type = NativeWindowType.UTILITY;
var window:NativeWindow = new NativeWindow(opt);
window.activate();
window.stage.addChild(new PreviousMainConstructor());
stage.nativeWindow.close();
}
this just opens a new utility window, and closes the main application window 这只会打开一个新的实用程序窗口,并关闭主应用程序窗口
you have to set the NativeWindowType of your window via NativeWindowInitOptions 's type
property when you instantiate a window. 你必须设置NativeWindowType通过你的窗口的NativeWindowInitOptions的
type
,当你实例化一个窗口属性。
more here: AIR Window Basics 此处提供更多信息: AIR Window基础
this.type = NativeWindowType.UTILITY;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.