New control spinner - change width

I have created a new control using ProtoUI and working properly, but how do I set the width dynamically according to the width?. If I change the width, the toolbar items attached after the control is getting affected. any suggestions?.

http://webix.com/snippet/1f7e44a2

Horizontal auto-sizing is a bit problematic currently.
You can set an auto width for the control and use layouts to align elements correctly

http://webix.com/snippet/8e39d8bb

Thank you.