与 localToGlobal 堆叠
我有这个代码(见 id=search):
<s:NavigatorContent id="clients" width="100%" height="100%" >
<s:layout>
<s:VerticalLayout gap="0"
paddingBottom="0"
paddingLeft="0"
paddingRight="0"
paddingTop="0"/>
</s:layout>
<s:SkinnableContainer backgroundColor="0xF3F3F3" width="100%" height="40">
<s:layout>
<s:HorizontalLayout verticalAlign="middle"
paddingLeft="3"
paddingBottom="2"
paddingTop="2"
paddingRight="3"/>
</s:layout>
<s:Button id="addClientBtn"
label="{resourceManager.getString(
'myResources','workplace.addClientBtn')}"
icon="{Images.add}"
click="{addClient()}"
doubleClickEnabled="true"
doubleClick="{openHelp('NewClient')}"/>
<s:Spacer width="100%" />
<components:SearchClients id="search"/>
</s:SkinnableContainer>
</s:NavigatorContent>
在 creationComplete 事件中 ->
search.localToGlobal( new Point(search.x,search.y))
Output returns
(x=0, y=32)
但从视觉上我看到这个输出是错误的。应该类似于 ~ (x=300, y=32)
有人可以帮忙吗?