Label in Button

Hello, again deperate… :slight_smile:

I already progressed with wxPython learning but now I am stuck with label on button.

I create button like this:
dialog = wx.Button(panel_x, label = “empty\nempty”)

This correctly creates label in two lines.
Then if I want to make text bigger and bold I use command:

self.SpeedWindow1b.SetLabelMarkup(""+plyn[0]+"" + “\n” + “”+nazov_miesta[0]+"")

I can not put the code here without being “executed” by this forum software :frowning:

The characters have properties as I want but “\n” is ignored and everything is in one line.

The goal is to achieve label as two lines with different sizes.

Thank you for help!
empty

after SetLabelMarkup applied:

bad

and this is the correct code as picture:

This site allows you to use standard (more or less) markdown for formatting your text, so enclosing text inside of backticks (or triple backticks for multiline text) will mark it as preformatted and will not do any more formatting within the backticks. You can also use the button on the toolbar that looks like </>.

Have you tried using <br> in your markup?

I tried also
<br>
but no impact, finally I used StaticText

Thanx for help