Adam Baranyai
Adam Baranyai

Reputation: 3867

Draw.io autosize by keeping width fixed, and expanding height if needed

Is there a way in draw.io, to autosize a text container, keeping it's width fixed, and telling draw.io to only adjust the height if neccessary?

I tried out almost all options in the properties of the text box, but when I apply the autosize, it always overwrites my set width and height, by making the width larger, and the height smaller.

I am putting these texts inside a swimlane, and what I would like to achieve is, either:

  1. when I add text to these text rectangles, the rectangle and the swimlane should expand automatically, but only vertically, ie, only the height of it should change (this would be the best for me, so that it is automatic)

  2. if the automatic solution is not achievable, I would be happy with something like manually pressing the autosize button, and draw.io should keep my width fixed, and change the size of the height only.

Upvotes: 6

Views: 10241

Answers (3)

Christian
Christian

Reputation: 1

I tried it for text boxes, but it also worked for re-sizing a cell-height in a table this way:

  1. For the respective text box (or cell), activate property "resize height".
  2. Do no activate the "resize width" property if you want only the height to be modified.
  3. Select your text box (or cell) which you need to amend.
  4. Press Ctrl+Shift+Y to re-size it.

Please note that word wrap does not need to be activated.

Upvotes: 0

Thibault Molleman
Thibault Molleman

Reputation: 57

I think these are the two settings you want to toggle on for the object to make it:

  • Lock the width
  • Expand in the height

Autosize | Fixed width

I'll be honest; I, personally, would like to make it expand downwards always, but it seems like that isn't possible

Upvotes: 1

Yuchen
Yuchen

Reputation: 33036

Couldn't find any documentation anywhere. But I notice that the behaviour of auto wrap is different depending on the object type that you choose. For example,

enter image description here

The above one is a "Rectangle". it won't resize the width when auto-sizing. The bottom one is a "UML/Object". It will resize both the width and height.

Upvotes: 1

Related Questions