How to obtain the [transform. Size] property of a Label?
Asked Answered
M

2

0

GD.Print(nameLabel.GetRect().Size);
nameLabel.Text = name;
GD.Print(nameLabel.GetRect().Size);

After setting the text, the length will become longer. I want to get the size after the change, but it seems to have not changed

Mills answered 5/3 at 2:14 Comment(0)
M
0

Mills It itself is 118, but the number I obtained does not match this one. It is another number, similar to 55

Mills answered 5/3 at 2:21 Comment(0)
M
0

Mills In other words, what I want is the length that will be stretched when the text content is too long, how can I obtain this length, and the length value that I need to change

Mills answered 5/3 at 2:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.