Label text cutoff inside of grid control

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By WarDev

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()

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

deaton64 | 2020-07-14 20:42

:bust_in_silhouette: Reply From: WarDev

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.

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.

WarDev | 2020-07-14 21:01