mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-26 02:39:44 +02:00
LCL, dbgrid, check column exists before getting button style, from Tristan Linnell, issue #22873
git-svn-id: trunk@39118 -
This commit is contained in:
parent
68fae160e5
commit
ad7b61f063
@ -1778,10 +1778,13 @@ begin
|
||||
end;
|
||||
|
||||
function TCustomDBGrid.ColumnEditorStyle(aCol: Integer; F: TField): TColumnButtonStyle;
|
||||
var
|
||||
gridcol: TGridColumn;
|
||||
begin
|
||||
result := cbsAuto;
|
||||
if Columns.Enabled then
|
||||
result := ColumnFromGridColumn(aCol).ButtonStyle;
|
||||
gridcol := ColumnFromGridColumn(aCol);
|
||||
if Columns.Enabled and assigned(gridcol) then
|
||||
result := gridcol.ButtonStyle;
|
||||
|
||||
result := DefaultEditorStyle(result, F);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user