Flex: How to scroll page to bottom? - apache-flex

I have a Flex application, I want to scroll the page to bottom when a button is pressed.
Scroll bars is added by browser, they do not belong to flex app or component.
I can do this by javascript but is there a way to do this with action script?
Thanks.
Enes

The Container class has a verticalScrollPosition and a maxVerticalScrollPosition. If you set the former to the latter you will scroll the container to the bottom.

Related

React-beautiful-dnd: Prevent page from scrolling when draggable is being dragged near edge of page

I'm using react-beautiful-dnd in a project and when I'm dragging a draggable, the page auto scrolls if I drag it near the top, bottom or sides of the page. I could theoretically fix this problem by placing the drag and drop container in the middle of the page so that the user probably wouldn't trigger the auto scroll as the draggable wouldn't be dragged to the edges of the page, but I'd prefer not to alter the layout in that way. Is there any way to disable the auto scrolling?

The page is scroll although the drawer is open fixed and temporary

I add a vuetify drawer to my application, and set the position to fixed and temporary.
When the drawer is open (and I have overlay), when I try to scroll the drawer stay in position - good. but the problem is the event pass to the page, and the page is do scroll.
How can I fix that?
My code on codesandbox.
open the link
click on toggle and the drawer is open.
try to scroll (with the mouse)
if you do, it's bad.
Your problem is that you give the wrapper div height:3000px.
you have to set it to height:100vh - in this case it will take the maximum height of your screen (like 100% of it)

FullPageJS prevents touch scrolling on hamburger menu; how to integrate?

I have a website using the fantastic fullPageJS plugin, and it does what it does very, very well.
I have however, an issue on mobile devices, where the sliding hamburger menu does not scroll with touch controls when the menu height exceeds that of the ViewPort, as in this picture:
Question
How do I force the side menu to accept touch-based scrolling?
You should make use of the fullpage.js option called normalScrollElements.
As detailed in fullpage.js docs:
normalScrollElements: (default null) If you want to avoid the auto scroll when scrolling over some elements, this is the option you need to use. (useful for maps, scrolling divs etc.) It requires a string with the Javascript selectors for those elements. (For example: normalScrollElements: '#element1, .element2'). This option should not be applied to any section/slide element itself.
Additionally, you can call fullpage_api.setAllowScrolling(false) when opening the modal. That will prevent fullpage.js to scroll up or down when using the mousewheel or trackpad.
You can set it back to the default value when closing the menu by using fullpage_api.setAllowScrolling(true).
You should try to add overflow: scroll if you haven't already.

scrollbar on dynamically rendered component in Flex

I'm trying to display a custom component i made inside a panel but when it renders the content is displayed outside of the panel box and there's no scrollbar.
In the designer i have this:
http://i.stack.imgur.com/V99pG.jpg
a panel
an instance of myComponent inside the panel
a button that calls a method on myComponent that adds some controls into it
When i run the application and press the button the following is displayed:
http://i.stack.imgur.com/wlDnV.jpg
See that the controls added dynamically in myComponent get over the panel's bottom line instead of showing only the visible part of the component and a scrollbar.
Any ideas how to fix it?
Thanks!
You should fix your component custom component height according to your panel if you are using text area in your component for displaying text then you should the text area size
I had your problem exactly gigkent. Turns out that it's to do with height settings. Apparently, setting the height to 100% is what messes it up.
I had an Accordion, a (several) NavigatorContent inside the accordion, a panel inside the navigator content, a scroller inside the panel with the scroller's viewport set to a VGroup declared outside all of that. The VGroup had clipAndEnableScrolling set to true.
Inside the VGroup, I had a form where I was dynamically adding radio buttons and my radio buttons were going off the screen. Setting the height of the VGroup to the height of the navigator content fixed the problem for me. I then had to set the width of the VGroup to the width of the Navigator Content -17 to compensate for the width of the scrollbar itself.
Here's the link that led me in the right direction.
http://www.actionscript.org/forums/showthread.php3?mode=hybrid&t=191108

AutoScroll iframe parent while dragging (Prototype & Scriptaculous)

I am having an iframe on a page. The iframe resizes itself based on the content loaded in it. So, it won't be having any scroll bars.
The iframe contains a list of draggable elements (Prototype & Scriptaculous). I have to drag the elements from bottom to top or vice versa, and while dragging, the parent window should scroll accordingly. I have modified the dragdrop.js file accordingly to scroll based on "window.parent.window" element. The outcome is that the parent window scrolls from bottom to top automatically on the drag of an element, but not vice versa.
Ok guys, thanks everyone. I think I have resolved this issue myself.
All I had to do was to calculate the position of the IFrame window and minus it from the top scroll value calculated by the drag & drop js code.

Resources