0

How can I set a width maximum or fixed value for a button?

I have an UI looking like this: enter image description here

The text field would be full path of a file and the 'Set' button is openning a dialog box. How can I go about increasing the text field's width and reducing the button's width? Thanks Kaveh

kaveh Alla
  • 11
  • 1
  • 1
    FYI: When using a StringProperty set to FILE_PATH, a button (to call the file browser) is going to be added automatically -> How to create a Folder Dialog?. This also would make it consistent with the rest of the UI so the question is: Do you really want to have an extra extra operator to call that dialog? – brockmann Jun 01 '20 at 17:23
  • 1
    Great!This actually makes it so much easier and the code much simpler. In gerneral though is there a way, other than row and column definition to control the size of button? – kaveh Alla Jun 01 '20 at 17:57
  • There is split and flow: https://docs.blender.org/api/current/info_best_practice.html#user-interface-layout Also have a look into the python templates that comes with blender. Can we close this one as a duplicate or the linked question? – brockmann Jun 01 '20 at 18:15
  • sure. thanks a lot! – kaveh Alla Jun 01 '20 at 18:19

0 Answers0