|
From: <AFr...@ba...> - 2001-03-14 17:48:55
|
Is there a bug in the ScrollPane widget that prevents you from creating
your
own widget that adds the ScrollPane widget as a child? If I use
this.addChild(new ScrollPane()) I do not get scrollbars. If I use
DynAPI.document.addChild(this.scrollObj) I get scrollbars.
I have tried several of the current snapshots from the past month and
I have the same problem.
Here is the code for what I am attempting to do:
function Grid1()
{
this.DynLayer = DynLayer;
this.DynLayer();
this.setSize(200, 200);
this.setBgColor("silver");
this.grid = new DynLayer();
this.grid.setSize(500, 500);
this.grid.setBgColor("blue");
this.grid.setHTML("<h1>a<br />b<br />c<br />d<br />e<br />f<br /></h1>");
this.scrollObj = this.addChild(new ScrollPane(this.grid));
this.scrollObj.moveTo(25, 25);
this.scrollObj.setSize(this.getWidth() - 30, this.getHeight() - 30);
}
Grid1.prototype = new DynLayer;
If I change the line from:
this.scrollObj = this.addChild(new ScrollPane(this.grid));
to
this.scrollObj = new ScrollPane(this.grid);
DynAPI.document.addChild(this.scrollObj);
the ScrollPane displays correctly. Otherwise, the ScrollPane does not
display
any scrollbars.
Thanks,
Andy
|