two questions about width

Hello! I learn this intersting framework. I try create simple form http://pastebin.com/bqEcGsNf
And I have some trouble: { view:“button”, value: ‘Сформировать’, type: “form”, sizeToContent:true } - button occupies all available width, if not specifed manualy. I need to have a button has a width on the content, but sizeToContent:true option, not work.
A similar problem with the “label”, of form elements.

Hi Evgen,

You are right, there’s no possibility to adjust controls and their elements (like labels) to their content. They will take the whole available space if no size is provided. If there’re several elements in the row or column, they will evenly distribute the available space among them. This is Webix autosizing pattern.

As for the button you can

  • place it in layout to enable relative sizing, and additonally, provide “gravity” parameter for it
  • or define “inputWidth” in pair with alignment.

http://webix.com/snippet/d92c74af

Possible options for control sizing are described here: http://docs.webix.com/desktop__controls_guide.html#settingdimensions

Thanks!