Hi,
i have an TAdvStringGrid (ver. 8.6.14.2) with a few hidden Columns and few Colums with CellButtons.
OnButtonClick does'nt work for Cells that are behind any invisible col, and i think there is a Bug in
procedure TAdvStringGrid.WMLButtonUp(var Msg: TWMLButtonUp);
[...]
if (FPushedCellButton.x <> -1) {and (x > -1) and (y > -1)} then
begin
Canedit := (goEditing in Options);
bc := Point(x,y);
rx := RemapCol(x);
if (x > -1) and (y > -1) then
begin
if not ControlLook.NoDisabledButtonLook then
CanEdit := IsEditableInt(rx,y);
bc := BaseCell(x,y);
end;
For my understanding the call of IsEditableInt needs an DisplayColumn Index - NOT an RealColumn Index (RemapCol(x) in above snippet) because there is a call to GetCellFixed with this Index in IsEditableInt().
function TAdvStringGrid.IsEditableInt(ACol,ARow: Integer): Boolean;
var
IsFixed,IsEdit: Boolean;
BC: TPoint;
begin
if IsMergedCell(ACol, ARow) and not IsBaseCell(ACol, ARow) then
BC := BaseCell(ACol,ARow)
else
BC := Point(ACol,ARow);
IsFixed := False;
IsEdit := True;
GetCellReadOnly(BC.X,BC.Y,IsEdit);
GetCellFixed(BC.X,BC.Y,IsFixed);
Result := IsEdit and not IsFixed;
end;
Ok, the problem was related to fixed cell use for defining non editable cells.
We could now reproduce this and we applied a fix that will be included in the next update.