resize the YUI2 control

Hi,

Im looking at the webSDK example and i cant figure out how to make the control resize.
has anyone managed to do this?

or has anyone managed to get tinymce to work. there are various posts on here, but nothing i can see that is working correctly.

[quote=187828:@Russ Lunn]Hi,

Im looking at the webSDK example and i cant figure out how to make the control resize.
has anyone managed to do this?[/quote]

What do you mean by resize ? Zoom like a browser, or simply resize the control itself ?

just to resize the control to make it wider and taller, based on the browser window size.

i tried setting the docking controls in the ide,
i’ve tried setting the width & height but they have no effect.
the control stays its initial size as set in the ide.

[quote=187933:@Russ Lunn]just to resize the control to make it wider and taller, based on the browser window size.

i tried setting the docking controls in the ide,
i’ve tried setting the width & height but they have no effect.
the control stays its initial size as set in the ide.[/quote]

Apparently the Web Control Wrapper is just a Div, and as it appears in the Developer console code, has no size. All is contains is the basic HTML code. I edited the style to give it dimensions, and it becomes possible to change its size and position. You could use JavaScript to do that. See http://www.w3schools.com/jsref/prop_style_width.asp ; left, top and height can be changed the same way.

hi Michel

so, i looked at that and tried this in the webpage1.resized event

[code] dim s as string = “document.getElementById(’” +YUI2RTE1.ControlID + “’).style.width=’@1’;”

s = s.replace("@1",str(me.width ))
me.ExecuteJavascript(s)
[/code]

no errors, but it stays the same width.

when you say you ‘edited the style to give it dimensions’ what did you mean?

The YUI HTML Editor control is just an example of how one might use the WebSDK to create a control. It was never meant to be a drop-in working control.

[quote=187956:@Russ Lunn]hi Michel

so, i looked at that and tried this in the webpage1.resized event

[code] dim s as string = “document.getElementById(’” +YUI2RTE1.ControlID + “’).style.width=’@1’;”

s = s.replace("@1",str(me.width ))
me.ExecuteJavascript(s)
[/code]

no errors, but it stays the same width.

when you say you ‘edited the style to give it dimensions’ what did you mean?[/quote]

It works here with the same command. You may want to add the unit next to the value :

[code] dim s as string = “document.getElementById(’” +YUI2RTE1.ControlID + “’).style.width=’@1’px ;”

s = s.replace("@1",str(me.width ))
me.ExecuteJavascript(s)
[/code]

What I did was to look in Chrome Developer console elements, located the yui-skin, double clicked on Class="yui-skin-sam" and added after that style="display: block; height:100px; width: 371px;"

Which is what does the JavaScript, except when you do that in the developer console, you can enter values and see the result immediately when you press Return.

I often use that to experiment.

Side note : resizing the control does not resize the content does not resize the toolbar inside. You will have to do it yourself.

It is a nice control, though.

i’m just trying to learn how it all works!