-
All replies
-
Helpful answers
-
Jul 8, 2016 12:17 AM in response to catonpubby spinaluc@,Hi catonpub,
you can use a javascript code.
1) name the Drawing object as "drawingView" (selecting it and changing its name in the inspector,
first field called Outlet);
2) select the slider and in the bottom of inspector, in the Interaction section, add an event as a "Did change value",
choosing Execute Javascript;
3) when the javascript page opens, select the text you will find and replace it with this:
this.onControlValueChange = function (event) {
// Code here for the "Did Change Value" event.
var drawingView = this.viewController.outlets.drawingView;
drawingView.brushSize = this.value;
};
4) in the properties of the slider (inspector) I set the Initial value to "5", as the default brush size in the Drawing object.
Enjoy your widget and have a nice day!