Inkscape.org
Creating New Extensions Is it possible to change the width of a "string" field input box on the dialog?
  1. #1
    Sue Zakar Sue Zakar @Shoshanaz

    We have an extension that allows the user to input a color in a dialog field of type "string"

    The input box is quite wide and causes the entire dialog box to be unnecessarily wide.

    Anyone know if there is a way to specify how long it should be?

     

  2. #2
    inklinea inklinea @inklinea⛰️

    No you cannot set the width in pixel for example of the string box.

    You should be able to 'bookend' the text box by adding a <separator/> (or other element ) inside the same <hbox>

    This should stop it growing excessively to the right.

    <hbox>
    <param name="name" type="string" gui-text="Input:" max-length="100">Some default text</param>
    <separator/>
    </hbox>
    <hbox>
        <label>Hello</label><label>this is a test</label><label>hello</label>
        <label>Hello</label><label>this is a test</label><label>hello</label>
        <label>Hello</label><label>this is a test</label><label>hello</label>
    </hbox>

    It's also possible to limit the number of characters in the box, but is does not affect its size.

    https://inkscape.gitlab.io/extensions/documentation/authors/inx-widgets.html?highlight=inx%20parameters

     

    Screenshot From 2022 03 10 21 19 17
  3. #3
    Sue Zakar Sue Zakar @Shoshanaz

    Thanks for this info.  (and apologies for the late thank you)

Inkscape Inkscape.org Inkscape Forum Creating New Extensions Is it possible to change the width of a "string" field input box on the dialog?