简体   繁体   English

Flex画布滚动问题

[英]Flex canvas scrolling problem

I have a canvas in my Flex project. 我的Flex项目中有一块画布。 It has one child element. 它有一个子元素。

  1. I made the element's y property to 500 and a scrrollbar appeared on the canvas. 我将元素的y属性设置为500,并且scrrollbar出现在画布上。

  2. I dragged the scrollbar to bottom to see my element. 我将滚动条拖动到底部以查看我的元素。

  3. I moveed element to y = 200 我将元素移到y = 200

  4. After that the scrollbar is still on the same place. 之后,滚动条仍位于同一位置。 How can I update the scrollbar and move it to the top? 如何更新滚动条并将其移至顶部?

Thanks 谢谢

Please, provide the code you're trying to use. 请提供您要使用的代码。 The following code behaves correctly (scrollbar disappears after clicking the label): 下面的代码行为正确(滚动条在单击标签后消失):

<mx:Canvas height="300" width="300">
    <mx:Label id="tl" text="Moved label" y="500" click="tl.y=200;" />
</mx:Canvas>

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

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