The MouseMove event appears to only get called if no buttons are pressed.
I am considering setting a global variable when the button is pressed, but that feels like bad style.
procedure TfrmMain.pbxGridMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
var
aButton: Word;
begin
//Decide which cell we are in
cellX := X DIV gridSizX;
cellY := (pbxFieldPro.Height - Y) DIV gridSizY; //Want 'Y' "going upwards"
sbrImagZ.Panels[4].Text := Format('pbxField: (x:%d, y:%d) --> Cell = (%d, %d)', [X, Y, cellX, cellY]);
//PROBLEM: If mouse button is down we do not see the move event[?]. On release we see the move, but then the button is zero
aButton := GetMouseButtons;
sbrImagZ.Panels[0].Text := Format('Button = $%2X', [aButton]);
if MouseLeftButton = GetMouseButtons then
begin
//##############Never get here UNTIL button released#####################
pbxFieldProMouseDown(pbxFieldPro, mbLeft, Shift, X, Y);
end;//if
end;//pbxGridMouseMove