From 51a4213c3f74b447b3c7b51ec993b60f05f15220 Mon Sep 17 00:00:00 2001 From: paul Date: Sun, 11 May 2008 12:38:53 +0000 Subject: [PATCH] lcl: ToolBar should not get focus (in other case every toolbutton click will focus it) git-svn-id: trunk@15092 - --- lcl/comctrls.pp | 1 + lcl/include/toolbar.inc | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/lcl/comctrls.pp b/lcl/comctrls.pp index 92cfc440c3..fa16c2029f 100644 --- a/lcl/comctrls.pp +++ b/lcl/comctrls.pp @@ -1548,6 +1548,7 @@ type procedure EndUpdate; virtual; procedure Paint; override; procedure SetButtonSize(NewButtonWidth, NewButtonHeight: integer); + function CanFocus: Boolean; override; public property ButtonCount: Integer read GetButtonCount; property Buttons[Index: Integer]: TToolButton read GetButton; diff --git a/lcl/include/toolbar.inc b/lcl/include/toolbar.inc index 91c3932290..96ec30c5a4 100644 --- a/lcl/include/toolbar.inc +++ b/lcl/include/toolbar.inc @@ -413,6 +413,11 @@ begin end; end; +function TToolBar.CanFocus: Boolean; +begin + Result := False; +end; + function TToolBar.CanAutoSize(var NewWidth, NewHeight: Integer): Boolean; begin Result := WrapButtons(NewWidth, NewHeight);