procedure TFormBeds.myMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if Button = mbLeft then
with Sender as TStringGrid do
BeginDrag(False,10);
end;
I have taken over the OnStartDrag handler, but it doesnt get called for some reason, athough the same OnStartdrag handler does get called for the components I drop on the form manually. Buried inside the 'Controls' code I find that the manually crafted components take a branch in the tControl.BeginDrag handler {if csLButtonDown in ControlState}where my runtime created component fails that branch because the ControlState is an empty set.
Does anyone have any clues?
I am writing a 'diary' application, where the diary manages bookings for different rooms. Unfortunately the time period for each room is varied, so I cant use a multicolumn stringrid and chose to use a number of single column stringGrids side by side. I need to take over the whole bagage of mouse events to handle clicks, double clicks, and drag/drop, but the event behaviour is not straighforward.
best regards
Leo
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz