如何移动堆栈

How to move stack

我正在尝试使用以下代码在 keyboardactivated 上向上移动子堆栈

local lStackLoc,lStackSize

on openstack

   set the fullscreenmode of me to "exactFit" 
   put the loc of this stack into lStackLoc
   put the effective working screenRect into lStackSize

end openstack

----------------------

on keyboardactivated

   put the effective working screenRect into tStackSize
   set itemdel to comma
   put item 4 of lStackSize - item 4 of tStackSize into tKeyboardHeight
   put item 2 of lStackLoc - tKeyboardHeight into tNewLocY
   put item 2 of lStackLoc & "," & tNewLocY into tStackLoc
   move stack "mainsub" to tStackLoc 

end keyboardactivated

----------------------

on keyboardDeactivated

   move stack "mainsub" to lStackLoc

end keyboardDeactivated

堆栈没有移动。我错过了什么吗,是否可以移动子堆栈,即使它的一部分不在屏幕上?

您的应用程序 运行 是在移动设备上还是在桌面系统上?

如果 运行 在移动设备上,堆栈始终使用屏幕的矩形显示,并且您一次只能显示一个堆栈。 fullscreenMode 确定堆栈相对于屏幕矩形的大小以及堆栈内容的显示方式,但您不能在移动屏幕上四处移动堆栈。