mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 14:37:48 +02:00
LCL: grids: support csNoFocus. Modified patch from Gabor Boros. Issue #28931
git-svn-id: trunk@50454 -
This commit is contained in:
parent
08960d78f2
commit
3afba023bb
@ -2535,7 +2535,7 @@ var
|
||||
P: TPoint;
|
||||
procedure doMouseDown;
|
||||
begin
|
||||
if not Focused then
|
||||
if not Focused and not(csNoFocus in ControlStyle) then
|
||||
SetFocus;
|
||||
if assigned(OnMouseDown) then
|
||||
OnMouseDown(Self, Button, Shift, X, Y);
|
||||
|
@ -6091,7 +6091,7 @@ procedure TCustomGrid.MouseDown(Button: TMouseButton; Shift: TShiftState; X,
|
||||
|
||||
function DoAutoEdit: boolean;
|
||||
begin
|
||||
result := FAutoEdit and EditingAllowed(FCol) and
|
||||
result := FAutoEdit and not(csNoFocus in ControlStyle) and EditingAllowed(FCol) and
|
||||
(FGCache.ClickCell.X=Col) and (FGCache.ClickCell.Y=Row);
|
||||
if result then begin
|
||||
SelectEditor;
|
||||
@ -6113,7 +6113,7 @@ begin
|
||||
DebugLn('Mouse was in ', dbgs(FGCache.HotGridZone));
|
||||
{$ENDIF}
|
||||
|
||||
if not Focused then begin
|
||||
if not Focused and not(csNoFocus in ControlStyle) then begin
|
||||
SetFocus;
|
||||
if not Focused then begin
|
||||
{$ifDef dbgGrid} DebugLnExit('TCustomGrid.MouseDown EXIT: Focus not allowed'); {$Endif}
|
||||
|
Loading…
Reference in New Issue
Block a user