From d68ac79fd01a70141598a50def46a08bd7cdd60d Mon Sep 17 00:00:00 2001 From: micha Date: Fri, 4 Mar 2005 15:44:53 +0000 Subject: [PATCH] WS_HSCROLL disables wordwrap, disable it if wordwrap requested git-svn-id: trunk@6890 - --- lcl/interfaces/win32/win32wsstdctrls.pp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lcl/interfaces/win32/win32wsstdctrls.pp b/lcl/interfaces/win32/win32wsstdctrls.pp index 26c690c49b..757a073638 100644 --- a/lcl/interfaces/win32/win32wsstdctrls.pp +++ b/lcl/interfaces/win32/win32wsstdctrls.pp @@ -840,8 +840,6 @@ begin Flags := Flags or ES_AUTOVSCROLL or ES_MULTILINE or ES_WANTRETURN; if TCustomMemo(AWinControl).ReadOnly then Flags := Flags or ES_READONLY; - if not TCustomMemo(AWinControl).WordWrap then - Flags := Flags or ES_AUTOHSCROLL; case TCustomMemo(AWinControl).ScrollBars of ssHorizontal, ssAutoHorizontal: Flags := Flags or WS_HSCROLL; @@ -850,6 +848,10 @@ begin ssBoth, ssAutoBoth: Flags := Flags or WS_HSCROLL or WS_VSCROLL; end; + if TCustomMemo(AWinControl).WordWrap then + Flags := Flags and not WS_HSCROLL + else + Flags := Flags or ES_AUTOHSCROLL; FlagsEx := FlagsEx or WS_EX_CLIENTEDGE; pClassName := 'EDIT'; WindowTitle := StrCaption;