Text Box Ellipsis

Is there a way to define a text box in terms of height and width so that an ellipsis with three dots only appears when the text fills the entire text box? Currently, the text is being truncated only based on the width of the text box, even though theoretically, it could wrap to the next line if there’s enough space. There must be a solution for this, right?

Screenshot 2023-10-12 164809