BeginDrag(False,10)
in OnMouseDown event of DbGrid ( which was hidden in D4, surfaced in D5).
BUT : OnMouseDown only fires when the user clikcs on the non-client are ONLY
(i.e. headers, scrollbars etc.) but not the rows.
Could anyone explain how to start dragging from DbGrid ? (The OnClick event
doesn't work because I want the row be selected - naturally - on that
event). I also set the editing of dbgrid to false because clicking on any
row puts the field in edit mode.
Thanks in advance
John
Mert Demir <mcd...@facstaff.wisc.edu> wrote in message
news:7u4mop$rg...@forums.borland.com...
John Elrick wrote in message <7u54it$18...@forums.borland.com>...
procedure TForm1.DBGrid1CellClick(Column: TColumn);
begin
DBGrid1.BeginDrag(False);
end;
That's with the mode set to dmManual.
Drag mode starts after you've moved the mouse (with the button down) more
than 5 pixels.
John
Mert Demir <mcd...@facstaff.wisc.edu> wrote in message
news:7u7bhq$kd...@forums.borland.com...
John
John Elrick <jo...@improgrammer.com> wrote in message
news:7ufkid$s6...@forums.borland.com...
procedure TForm1.Edit1DragDrop(Sender, Source: TObject; X, Y: Integer);
begin
Edit1.Text := FMyField.AsString;
end;
procedure TForm1.DBGrid1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
DBGrid1.BeginDrag(False);
FMyField := DBGrid1.SelectedField;
end;
procedure TForm1.Edit1DragOver(Sender, Source: TObject; X, Y: Integer;
State: TDragState; var Accept: Boolean);
begin
Accept := True;
end;
DBGrid1 is an TRxDBGrid in this instance.
FWIW