From 8b188009b0240062637e3b5e79ecfb7b692f61b4 Mon Sep 17 00:00:00 2001 From: juha Date: Mon, 29 Apr 2013 07:20:23 +0000 Subject: [PATCH] LCL: Update TDBText.Caption in overridden Loaded method. Issue #23206, patch from Tony Whyman git-svn-id: trunk@40925 - --- lcl/dbctrls.pp | 1 + lcl/include/dbtext.inc | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/lcl/dbctrls.pp b/lcl/dbctrls.pp index 3a135129ba..76703f215c 100644 --- a/lcl/dbctrls.pp +++ b/lcl/dbctrls.pp @@ -271,6 +271,7 @@ Type protected procedure Notification(AComponent: TComponent; Operation: TOperation); override; class procedure WSRegisterClass; override; + procedure Loaded; override; public constructor Create(AOwner: TComponent); override; destructor Destroy; override; diff --git a/lcl/include/dbtext.inc b/lcl/include/dbtext.inc index 5906077f2f..278457961d 100644 --- a/lcl/include/dbtext.inc +++ b/lcl/include/dbtext.inc @@ -89,6 +89,13 @@ begin Done := True; end; +procedure TDBText.Loaded; +begin + inherited Loaded; + if csDesigning in ComponentState then + Caption := Name +end; + { Public Methods} constructor TDBText.Create(AOwner: TComponent); begin