← All ideas
  • Published 23 Dec 2025

Add an option for multiline labels for Panels and co

So, I am aware of the existence of bpy.types.Panel.layout.label, but the text parameter does not support newline character (such as \n). If you create multiple labels below eachother, there will be a huge space between them which looks like the two labels do not belong to each other. Currently, as far as I know, there are only hacky solutions to this problem, such as creating a text label with a font size of zero so that the space between the labels disappearr.

Because the huge space between the labels is generally useful for seperating different labels, I suggest not to mess with this behaviour and instead just create a label which supports new-line characters such as \n.

100%

Development Status: In Development

Upvote 1 Downvote 0 blender/pulls/118579
sebastian61
23 Dec 2025

1 Comment

samueloates

You could use the textwrap module in blender, and use it's word wrap function based on the width of the area that it is in. This can be used to automatically create a new line as needed. For more information on this, you could do a google search for 'blender python multiline text', and it should come up with a website that shows how to use the word wrap function. It might look a bit complex or unintuitive, but after some experimentation it should be easy to understand the functions of it, some of which can be removed for simplification.