From 547fe3cdbe0ea672eb34a4abaad244f86828c7a9 Mon Sep 17 00:00:00 2001 From: ondrej Date: Thu, 24 Aug 2017 05:43:06 +0000 Subject: [PATCH] merge r55716 #bdb91bdc6d lcl: edit: force show texthint in InitializeWnd. Issue #32053 git-svn-id: branches/fixes_1_8@55741 - --- lcl/include/customedit.inc | 7 ++++--- lcl/stdctrls.pp | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lcl/include/customedit.inc b/lcl/include/customedit.inc index 3c188e3ce4..c39ec84026 100644 --- a/lcl/include/customedit.inc +++ b/lcl/include/customedit.inc @@ -53,7 +53,8 @@ begin if WidgetSet.GetLCLCapability(lcTextHint) = LCL_CAPABILITY_YES then TWSCustomEditClass(WidgetSetClass).SetTextHint(Self, FTextHint) else - if CanShowEmulatedTextHint then ShowEmulatedTextHint; + if CanShowEmulatedTextHint then + ShowEmulatedTextHint(True); end; {------------------------------------------------------------------------------ @@ -691,11 +692,11 @@ begin DebugLn('TCustomEdit.TextHintFontStyle is deprecated and will be removed in Lazarus 1.9'); end; -procedure TCustomEdit.ShowEmulatedTextHint; +procedure TCustomEdit.ShowEmulatedTextHint(const ForceShow: Boolean); var HintFont: TFont; begin - if (FEmulatedTextHintStatus<>thsHidden) then + if (FEmulatedTextHintStatus<>thsHidden) and not ForceShow then Exit; FEmulatedTextHintStatus := thsChanging; diff --git a/lcl/stdctrls.pp b/lcl/stdctrls.pp index 87c46e54a6..358418930c 100644 --- a/lcl/stdctrls.pp +++ b/lcl/stdctrls.pp @@ -731,7 +731,7 @@ type FTextHint: TTranslateString; function GetTextHintFontColor: TColor; //Remove in 1.9 function GetTextHintFontStyle: TFontStyles; //Remove in 1.9 - procedure ShowEmulatedTextHint; + procedure ShowEmulatedTextHint(const ForceShow: Boolean = False); procedure HideEmulatedTextHint; procedure SetAlignment(const AValue: TAlignment); function GetCanUndo: Boolean;