[Laszlo-user] horizontal rule between components

Robin robin at kallisti.net.nz
Tue Apr 11 00:27:24 EDT 2006


Robin wrote:
> OK, while poking through the docs I found the bit that said that you can't
> call addSubview directly to add a subview. Unfortunately, that part of the
> documentation doesn't go on to say what you can do to add a subview
> programmatically. Is it just a matter of adding it to the subviews array of
> the view, and removing it from that of canvas? Or is there more to it than that?
Just to reply to myself again...I worked it out.

(For the interested newbies like myself: classes have a constructor that you
can use to specify the parent, and the attributes, so when I changed my call to:
var v = new hrule(parent, {width: this.parent.width,
	bgcolor: this.linecolor});
it was happy.)

Robin.


More information about the Laszlo-user mailing list