Actionscript - 设置 Creative Suite 扩展的最小大小
我正在尝试设置创意套件扩展窗口的最小尺寸。我不希望用户能够将窗口大小调整为小于我定义的大小。
这是我尝试做的事情:
var instance:CSXSInterface = CSXSInterface.getInstance();
var extension:Extension = instance.getExtensions([instance.getExtensionId()]).data[0] as Extension;
extension.minHeight = 350;
extension.minWidth = 250;
不幸的是,这不起作用。我也尝试在 mxml 中设置它:
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
width="100%" height="100%" minWidth="250" minHeight="350" currentState="Loading"
historyManagementEnabled="false" layout="absolute">
但它也不起作用。有谁知道这个问题的解决方案?我见过其他扩展可以做到这一点,即 Adobe Kuler 扩展。
I'm trying to set the minimum size of the window of a creative suite extension. I don't want the user to be able to resize the window to a smaller size than the one I define.
Here is what I've tried to do:
var instance:CSXSInterface = CSXSInterface.getInstance();
var extension:Extension = instance.getExtensions([instance.getExtensionId()]).data[0] as Extension;
extension.minHeight = 350;
extension.minWidth = 250;
Unfortunately this doesn't work. I've also tried to set it in the mxml:
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
width="100%" height="100%" minWidth="250" minHeight="350" currentState="Loading"
historyManagementEnabled="false" layout="absolute">
But it doesn't do the trick either. Does anyone know the solution to this problem? I've seen other extensions doing it, namely the Adobe Kuler extension.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实证明这是清单文件中的设置。
在Extension Builder中,右键单击项目,CS Extension Builder >捆绑清单编辑器。在“扩展”选项卡下,选择“用户界面”。最小宽度和高度是可以在那里定义的一些设置,例如扩展图标。
Turns out this is a setting in the manifest file.
In Extension builder, right click on the project, CS Extension Builder > Bundle Manifest Editor. Under the Extension tab, select User Interface. Minimum width and height are some of the settings that can be defined there, along with the extension icon for instance.