Make it more visually clear where static text should wrap

Create a window of 150px width to check that the text really wraps at
150px.
This commit is contained in:
Vadim Zeitlin
2025-10-25 15:59:25 +02:00
parent bc3b22bb58
commit 1201f665ed
+9 -1
View File
@@ -131,8 +131,16 @@ WrapSizerFrame::WrapSizerFrame()
sizerRoot->Add( new wxStaticText( m_panel, -1,
"This is long text that will not wrap. This is long text that will not wrap."
));
// A window of 150px width for comparison.
auto* const ruler = new wxStaticText(m_panel, wxID_ANY, "150px",
wxDefaultPosition, wxSize(150, -1),
wxALIGN_CENTER);
ruler->SetBackgroundColour(*wxYELLOW);
sizerRoot->Add(ruler);
// A long wxStaticText that wraps at 150px
wxStaticText *stattext = new wxStaticText( m_panel, -1, "This is very long text that will wrap at 150x. This is very long text that will wrap at 150px." );
wxStaticText *stattext = new wxStaticText( m_panel, -1, "This is very long text that will wrap at 150px. This is very long text that will wrap at 150px." );
stattext->Wrap( 150 );
sizerRoot->Add( stattext );