Welcome to yEd Q&A!
Here you can ask questions and receive answers from other members of the community and yEd developers. And you can tell us your most wanted feature requests.


Is it possible to make the text boxes automatically re-size their width (and/or heights)?

0 votes

Is it possible to make the text boxes automatically re-size their width (and/or heights) so as to match the width required by the text inside the box?

And either way, is there any way to paste the width (and other properties) from one text box into another?


in Help by (810 points)

2 Answers

0 votes
For node labels, the text box size is controlled by property "Size". By default, "Size" is "Fit Content". This policy ensures that text boxes always grow to encompass their text. The other available policies bind the text box size to the size of the corresponding owner node. There is no way to manually specify the size of text boxes.
by [yWorks] (161k points)
OK I am new. Let's take this slowly. So I open an blank file. I click on blank area of the screen. An orange box (a Rectangle Shape Node) appears with "1" written as text. I type in a load of random text - say 100 characters. But the box width remains unchanged - a square.

So now I click on the orange box. In the "properties view" (bottom right), I can see that under the  "General" heading both the Width and the Height are "30.0" (pixels presumably).

But I want the width to match the text!

Further down under Label, Size = "Fit Content"- is that what you mean? IF so that seems to determine how wide the text is rather than how wide the box underneath it is (??).

What am I doing wrong?
Sorry I still can't get the box width to re-size automatically.  Where do I find this property? If I select a text box, right-click, under General there is something called Width which seems to require a fixed number of pixels.   :^/
0 votes
OK I seem to have solved my own problem.

File ==> Preferences ==> Editor ==> "Dynamically Adjust Node Size to Label Size" now gets the width of the boxes (nodes) to respond to the text width.

Sadly I can't find any way to paste node properties from one node to another.
by (810 points)
Quote: [Sadly I can't find any way to paste node properties from one node to another.]

Yes, you can.

1. Change the properties of a node that you will use as a model or prototype.
2. With context menu (right+click on any of the palette headers add a new section. Give it a name --could be "my prototype objects"--
3. On the canvas change the properties of an object, say, a node.
4. Once finished, right +click on that object and choose "Add to Palette", then the section you just created.
5. Go to that section on the palette window and look for your object.
6. If you right+click on that object and choose "Apply", the properties of that object will be inherited by all those on the canvas that you select beforehand.
OK that great news - many thanks.

I must say I never would have guessed all that without some serious investigation. Do you think it would be worth my making a suggestion of any creating an easier method?
Is there a way to say "I have solved my own problem" so as to take my question off the "unanswered" list?
Legal Disclosure | Privacy Policy