Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

BB10: Fuse ScrollPane gone?

What happened to ScrollPane in the BB10 fuse library and what has repalced it?  There is nothing in the release notes.

Developer
Posts: 889
Registered: ‎08-31-2009
My Device: 9530, 9630, 9800, 8530, 9900, 9810, 9930, PlayBook, Dev Alpha
My Carrier: Verizon

Re: BB10: Fuse ScrollPane gone?

I have also noticed that qnx.ui.core.UIComponent is not included in the BB10 beta


Read my thoughts on BlackBerry Development at news.ebscer.com
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: BB10: Fuse ScrollPane gone?

Need to use qnx.fuse.ui.core.UIComponent.

Still like to know how we are suppose to scroll things around. Grant it that I was never a fan in how ScrollPane was implemented, but if you are going to get rid of something, please replace it with something better (to RIM).
Retired
Posts: 427
Registered: ‎02-22-2012
My Device: BlackBerry Z10, BlackBerry Dev Alpha C, BlackBerry PlayBook
My Carrier: Bell

Re: BB10: Fuse ScrollPane gone?

Hi,

 

ScrollPane has been deprecated.

 

The recommended approach is to use a container. Here is a quick sample to get the idea:

 

_feedbackContainer = new Container();

_feedbackContainer.scrollDirection = ScrollDirection.VERTICAL;

_feedbackContainer.y = _headerBG.height;

 _feedbackContainer.width = stage.stageWidth;

_feedbackContainer.height = stage.stageHeight - _headerBG.height;

 As far as I'm aware UIComponent is still in the API - https://developer.blackberry.com/air/beta/apis/qnx/fuse/ui/core/UIComponent.html

 

Cheers,

Dustin 

Follow me on Twitter: @dustinmalik
-----------------------------------------------------------------------------------------------------
Keep up to date on BlackBerry development: http://devblog.blackberry.com/
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: BB10: Fuse ScrollPane gone?

Tried a couple of examples and it does not seem to work.  There is nothing in the API or the class that indicates how to set the contents and/or update the view for scrolling.  Here is an example of what does not work:

package chart
{
	import qnx.fuse.ui.core.Container;
	import qnx.fuse.ui.listClasses.ScrollDirection;
	
  public class ChartView extends Container
  {
	public var field :ChartBase = new ChartBase();
		
	public function ChartView()
	{
		super();
		this.scrollDirection = ScrollDirection.HORIZONTAL;
		this.hAutoScroll = true;
		this.hScrollVisible = true;
		this.allowScrollPastEdge = true;
		this.field.setActualSize( 1500, 500 );
		this.addChild( this.field );
		//this.scrollX = 100;
	}
	
		///////////////////////////////////////////////////////////////
	override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
	{
		super.updateDisplayList( unscaledWidth, unscaledHeight );
		this.field.height = unscaledHeight;
	}
  }
}

 And:

package chart
{
  import qnx.fuse.ui.core.UIComponent;
	
  public class ChartBase extends UIComponent
  {
		
		///////////////////////////////////////////////////////////////
	public function ChartBase()
	{
		super();
	}
		
		///////////////////////////////////////////////////////////////
	override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
	{
		this.graphics.clear();
		this.graphics.lineStyle( 5, 0xFF0000 );
		this.graphics.beginFill( 0xFFFFFF, 0.7 );
		this.graphics.drawRect( 5, 5, unscaledWidth - 10, unscaledHeight - 10 );
		this.graphics.endFill();
	}
  }
}

 Some of the code was experimental to see if setting some of the Container attributes did anything.

Developer
Posts: 121
Registered: ‎01-21-2011
My Device: Z10 LE #00055
My Carrier: Telus

Re: BB10: Fuse ScrollPane gone?

Is there any update on this?  I'm also having trouble getting scrolling containers to work with the BB10 SDK.

From my testing, the Container.contentHeight always equals "0" regarding of what I add to the container.  Could this be the problem?

VENTURCON
For BB10: e-Mmanuel Bible Reader, e-Mmanuel Audio Bible, PM Assist
For PlayBook: e-Mmanuel Bible Reader, Business Analysis Toolbox
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: BB10: Fuse ScrollPane gone?

I've heard nothing. I just dont think it works. There is suppose to be an update "soon", so hopefully they got the scroll container to work by then.
Developer
Posts: 587
Registered: ‎04-01-2009
My Device: Z10, PlayBook
My Carrier: NA

Re: BB10: Fuse ScrollPane gone?

Has this thread still not been answered?  I'm trying to answer the same question: How does scrolling work? I also tried the suggestion and it didn't work.

Developer
Posts: 587
Registered: ‎04-01-2009
My Device: Z10, PlayBook
My Carrier: NA

Re: BB10: Fuse ScrollPane gone?

Scrolling is working for me now.

 

The problem was that my "Container" object was given the height of the stage, so even though it exceeded the visible height (defined by the presence of an ActionBar), there was nothing to scroll.

 

The solution was to resize the Container to be the height of the stage minus the height of the ActionBar.

Developer
Posts: 587
Registered: ‎04-01-2009
My Device: Z10, PlayBook
My Carrier: NA

Re: BB10: Fuse ScrollPane gone?

I had got this to work by using a StackLayout in conjunction with a Container, but then I realized that StackLayout is different than the Cascades StackLayout and so switched to using RowLayout. But RowLayout isn't working for me since it seems to resize labels to be a single line in height.

 

So I stopped using the Layout controls and went back to manually positioning Label controls in a Container, and now scrolling isn't working. Perhaps this is what others are finding as well?