304 views
in GUI Development by
Scroll a verticalList by a SlideTouchHandler to the top and bottom position. if continue to scroll up or down, there will be an empty space shown. How can we resolve this problem?

1 Answer

0 votes
by
 
Best answer

Hi,

you mean surrely the rubber band effect. This effect can't be disabled in the actual version. You can however, derive a new class from the VerticalList and implement there an adaptation to limit the scroll offset. For this purpose:

- Derive a new class from the existing Core::VerticalLIst class. See Subclass an existing class.

- Open your derived class for editing.

- Within the class override the onset-method OnSetScrollOffset. See Override an inherited method.

- Open the method for editing and implement it with following code:

if ( value > 0 )
  value = 0;

if ( value < -(( NoOfItems * ItemHeight ) - Bounds.h ))
  value = -(( NoOfItems * ItemHeight ) - Bounds.h );

// Execute the inherited functionality
super( value );

- Use your derived class instead of the original VerticalList class.

Hope it helps you.

Best regards

Paul

Embedded Wizard Website | Privacy Policy | Imprint

...