You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by leejk <le...@yahoo.com> on 2014/05/06 22:18:14 UTC

Scroller Within Scroller?

Hello,

I have a custom component that displays data in rows with column headers.
These rows are within a group that is wrapped around a scroller component
that is locked to vertical scrolling. The column header is in another group
that is outside of the inner scroller and therefore does not scroll
vertically, but it and the rows are children of an outer scroller component,
which is locked to horizontal scrolling. The idea is to be able to
horizontally scroll the whole component when the device is rotated to
portrait mode, but still scroll the rows vertically while the column headers
remain visible. It seems tho that the outer scroller is capturing the touch
events needed to scroller the inner scroller vertically. Is there another
approach that I should be looking at?

thx



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Scroller-Within-Scroller-tp6393.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Scroller Within Scroller?

Posted by Alex Harui <ah...@adobe.com>.
I think you need to find out if the wrong value is computed or if something else later changes the size
Sent via the PANTECH Discover, an AT&T 4G LTE smartphone.

leejk <le...@yahoo.com> wrote:


So I was looking at this again, and apparently a contributing factor to my
problem is that the inner most scroller (_scrollPane) is not getting sized
correctly. Even though I have setting the height of the scroller to the
height of the component minus the header height, when debugging it still is
expanding to the height of it's  child container. Here is the code:

override protected function updateDisplayList(unscaledWidth:Number,
unscaledHeight:Number):void
{
        super.updateDisplayList(unscaledWidth, unscaledHeight);

        _unitsToggle.move(unscaledWidth -
_unitsToggle.getExplicitOrMeasuredWidth(), -20);
        _scrollPane.move(0, _modelHeaderContainer.getExplicitOrMeasuredHeight());
        _scrollPane.setActualSize(unscaledWidth, unscaledHeight -
_modelHeaderContainer.getExplicitOrMeasuredHeight());
        _listBoxScroller.move(0, 0);
        _listBoxScroller.setActualSize(unscaledWidth, unscaledHeight);
        trace("here");
}

Anyone know why setActualSize in this case is not sizing the scroller
correctly?



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Scroller-Within-Scroller-tp6393p6397.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Scroller Within Scroller?

Posted by leejk <le...@yahoo.com>.
So I was looking at this again, and apparently a contributing factor to my
problem is that the inner most scroller (_scrollPane) is not getting sized
correctly. Even though I have setting the height of the scroller to the
height of the component minus the header height, when debugging it still is
expanding to the height of it's  child container. Here is the code:

override protected function updateDisplayList(unscaledWidth:Number,
unscaledHeight:Number):void
{
	super.updateDisplayList(unscaledWidth, unscaledHeight);

	_unitsToggle.move(unscaledWidth -
_unitsToggle.getExplicitOrMeasuredWidth(), -20);
	_scrollPane.move(0, _modelHeaderContainer.getExplicitOrMeasuredHeight());
	_scrollPane.setActualSize(unscaledWidth, unscaledHeight -
_modelHeaderContainer.getExplicitOrMeasuredHeight());
	_listBoxScroller.move(0, 0);
	_listBoxScroller.setActualSize(unscaledWidth, unscaledHeight);
	trace("here");
}

Anyone know why setActualSize in this case is not sizing the scroller
correctly?



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Scroller-Within-Scroller-tp6393p6397.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.