简体   繁体   English

如何在Spec(Pharo 3)中以编程方式最大化窗口

[英]How to maximize window programatically in Spec (Pharo 3)

Documentation does not describe how to maximize a window when its opened. 文档没有描述打开窗口时如何最大化窗口。 API suggests that API建议

aComposableModel containingWindow maximize.
aComposableModel window maximize.

but none of them works. 但它们都不起作用。 Is there a way to maximize a recently opened Window? 有没有办法最大化最近打开的窗口?

Sorry for the delay. 抱歉耽搁了。 I answered two days ago, but it seems it did not work :S 我两天前回答了,但似乎没用:S

So now in Pharo this feature is not supported. 因此,现在在Pharo中不支持此功能。 A workaround is: 解决方法是:

m := TextModel new openWithSpec.
m widget widget maximize.

Note : accessing via widget is really bad (and will be deprecated soon). 注意 :通过widget访问确实很糟糕(很快就会弃用)。

But since you asked it, and it's actually something missing, this feature has been integrated into the bleeding edge version of Spec. 但既然你问它,它实际上是缺了点什么,这个功能已经被集成到了前沿规格的版本。 So now you can do: 现在,您可以执行以下操作:

m := TextModel new openWithSpec.
m maximize.

The next sync between Spec and Pharo will bring this feature into Pharo. Spec和Pharo之间的下一次同步会将此功能引入Pharo。

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

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