Chronigan wrote:
Is there a way to change a widgets height and width from a function within the widget?
What I'm asking is can I do something like Widget.Width = 578; from within a function and have the widgets width change to that?
yes, it can be done exactly same way as you said,
in the script editor, just place the lines of code in a function and call the function in some way:
- you can call the function by clicking on a button (button1OnClick);
- you can call the function on widget start (widgetOnLoad);
- you can call the function from another function;
- and .....
example:
//don't forget to add function name [button1OnClick] in the [OnClick] of [Button1] Object in the function tab of Designer (to call button1OnClick function when button1 Clicked)
Code:
function button1OnClick()
{
widget.Width = 578;
widget.Height = 480;
}