Resize panel based on parents text length

its the thing that says players torrent

you can actually give the Label itself a β€œpanel”-background, which has the size of the label:
Label β†’ Theme Overrides β†’ Styles β†’ New StyleBoxFlat β†’ Here you can set the color and also something like ExpandMargins and Border
If you insist on using the panel, maybe something like this:

panel.size = label.text.length * character_size # insert character size here 
1 Like

i did not know this thanks man

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.