Flex Scroll Container with segment

This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal.

Is it possible make a flex scroll container to scroll to a specific row of segment (with segment as a child widget)? I have tried using this.view.forcelayout() but it is not doing anything.

For example, to be executed on button click:

this.view.segTest.selectedRowIndex = [0,5];

this.view.forcelayout()

Hi,

We dont recommend to use Flex scroll container and Segment together. Both are scrollable widgets and its create the double-scrolling issue (Limitation from native side). When you try to set the focus on segment record, your segment won't scroll at all.

@Twvcey Rvndvll​, I have set segment height as 'Preferred', and the scrolling will only be done of flex scroll container. Will this still cause the doubling scrolling issue?

Hello,

Can you disable the scrolling (enable scrolling) for the flex scroll container and set the 100% height to segment and check the behavior.

I have been fighting this battle for WEEKS now ... now I can fix a handful of issues.

Hi @Petew Hill​ ,

I'm hoping the rows of your segment are having a fixed height.

So, lets say the height of each row is 50dp.

Then you can use the below code:

contentOffset = 50 * index; frmName.flxScroll.setContentOffset(contentOffset, false);

just pass the index number of the row that you want to scroll to.

Thanks,

@Twvcey Rvndvll​ I think we have similar requirement in many of my projects. The reason for using Segment under FlexScroll container is, there are other elements which needs to be scrolled along with listed row (segment). If we set the segment height property to "Preferred", our problem will be resolved, but again, I heard there would be performance issues.

What @Petew Hill​ asked is the valid one. I too looking for the answer.

Attached a sample app where I'm doing this that you might find useful. If it works for your use-case, you can modify it as per your need.