Handle wxTextCtrl created with wxTE_DONTWRAP or wxTE_NO_VSCROLL under wxQt

This commit is contained in:
ali kettab 2023-12-26 17:15:47 +01:00
parent 0eaff271ed
commit a0b0f524ff

View file

@ -367,6 +367,9 @@ public:
if ( flags & wxTE_RICH || flags & wxTE_RICH2 )
m_edit->setAcceptRichText(true);
if ( flags & wxTE_DONTWRAP )
m_edit->setLineWrapMode(QTextEdit::NoWrap);
}
private:
@ -668,6 +671,11 @@ bool wxTextCtrl::Create(wxWindow *parent,
if ( style & wxTE_MULTILINE )
{
m_qtEdit = new wxQtMultiLineEdit(new wxQtTextEdit(parent, this));
if ( style & wxTE_NO_VSCROLL )
style &= ~wxVSCROLL;
else
style |= wxVSCROLL;
}
else
{