0 votes

Hi All,

I'm having a problem with dynamically generated labels being slightly cut off inside of a default grid control object. When I put several generated labels inside of a grid, some of them occasionally have the very bottom portion of the text cut off. I've included a screenshot of the effect, my scene layout, as well as the code I use to generate the labels. Is there a way to avoid this effect?

The Effect:
The Effect

Scene Tree
enter image description here

Code to generate message

func addMessage(text):
    var newMessage = WarMessageBoxMessage.new()
    newMessage.text = text
    self.getMessages().append(newMessage)
    grid.add_child(newMessage)

    if messages.size() > maxMessages:
        deleteMessage(getOldestMessage())

    background.show()
in Engine by (33 points)

more of an idea than an answer, try setting the minimum size value of the label.

1 Answer

0 votes

As stated in a comment by deanton64, setting the minimum size value for the labels did result in the the text for the labels no longer being cut off.

by (33 points)

I'm putting this here so that other users know an answer has been found, but if you'd like the credit deanton64, I'd be happy to have you give an answer and select that one instead.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.