View Full Version : what happened to stretches in 4.x?
haplo_3
11-01-2007, 06:45 PM
i have the following code, when press on the button i just want to stretch the view in 30 pixel but instand the child view is not stretch right
<canvas debug="true">
<view id="stretchesView" height="100" width="100" x="100" y="100" bgcolor="green" stretches='both'>
<view height="10" width="10" bgcolor="red"/>
</view>
<button onclick="stretchesView.setAttribute('width',130)"/>
</canvas>
haplo_3
11-04-2007, 06:55 PM
anyone on this one?
how can i easly stretches the subviews without creating complicate delegates
senshi
11-05-2007, 03:01 AM
Found these two bugs: LPP-4684 (http://www.openlaszlo.org/jira/browse/LPP-4684) and LPP-3637 (http://www.openlaszlo.org/jira/browse/LPP-3637).
So, this bug seems to be known, but the usage of "stretches" (for subviews!) is discouraged, because it won't ever work in DHTML. But at least it should be fixed for bwcompat.
bruce
11-05-2007, 11:54 AM
I think stretching in general is broken for 4.x.x. There are a number of problems including this one. I'm not sure if there any relationship between the different problems but given that image handling is pretty important for a lot of apps, I'm hoping it gets worked on soon.
Cheers
haplo_3
11-05-2007, 05:10 PM
that means there is no way to modify the resource width and height?
bruce
11-05-2007, 05:29 PM
Not quite true. You can modify the width and height of the view and if stretches is set, it will stretch properly. It's not completely broken just enough that its a pain to work with.
I'm not sure what you are trying to do. I looked at your code, what do you expect? That modifying the upper view will somehow modify the lower? You could use contraints for the inner view to do what you want. I don't think you need to use stretches attribute.
Cheers
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.