two questions about width

edited September 2014 in Technical questions

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.

Comments

  • edited September 2014

    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

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!