jpoz
asked on
Detect resize on stringgrid column
In Delphi 5, is there a way to detect when a TStringGrid column is being resized?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
My answer - in OnMouseUp, I determined where the mouse was based on the CellRect, and determined if it was within the area where the resize occurs.
procedure StringGrid1.OnMouseUp(Send
Shift: TShiftState;
X, Y: Integer)
var
CellRect : TRect;
begin
CellRect :=
StringGrid1.CellRect(CellC
CellCoord.y);
if (x >= (CellRect.Right-3))
or (x <= (CellRect.Left+3)) then
{ resize detected }
end;