Positioning / Scrolling problem with Flex popup

后端 未结 3 574
误落风尘
误落风尘 2021-01-27 01:28

I\'m trying to work out a specific problem I\'m having with positioning in Flex using the PopUpManager. Basically I\'m wanting to create a popup which will scroll with the paren

3条回答
  •  攒了一身酷
    2021-01-27 02:01

    Found this post when searching the same problem in Google. I found two solutions on another site. Here they are:

    In the first solution ... a listener is added to react to the scroll event of the VBox which repositions the popup and additionally detects when the popup moves outside the bounds of the VBox, toggling it’s visibility to make it appear to “tuck under” the VBox as it’s spawning parent scrolls out of view.

    Full Article and Code

    The second solution is cleaner:

    Basically, I overlay a canvas on top of my VBox and “addChild” popup components to the canvas (NOT using popupmanager) and scroll the canvas along with the VBox. Setting the isPopup property of the popup component allows me to drag the component around like you can a true popup.

    Full Article and Code

提交回复
热议问题