View Issue Details

IDProjectCategoryView StatusLast Update
0023558LazarusLCLpublic2013-02-12 17:20
ReporterKrzysztof Dibowski Assigned ToJesus Reyes  
Status closedResolutionfixed 
Product Version1.1 (SVN) 
Target Version1.2.0Fixed in Version1.1 (SVN) 
Summary0023558: DBGrid - automatic drag mode starts to quickly

When you set DragMode to dmAutomatic on TDBGrid and then click on records, cursor is changing to drag on each click. DragMode should have some delay (like TTreeView or TListView)

To reproduce problem:
1. Drop DBGrid on form
2. Set DragMode property to dmAutomatic
3. I recommend to fill grid with some random data. You will better se the problem.
4. Run program and start click on records. On each click, cursor should change to drag mode for a moment.
Additional InformationLazarus 1.1 from SVN, revision 39684
FPC 2.7.1 from SVN

Linux Mint 14 64bit, Cinnamon (fork of Gnome shell 3.XX)
TagsNo tags attached.
Fixed in Revision39877
WidgetsetGTK 2
Attached Files


Luiz Americo

2012-12-31 02:28

developer   ~0064553

I can confirm the bug. But is not restricted to gtk2. It occurs also in Qt and Windows. Also is not specific to dbgrid. TStringgrid has the same behavior

Luiz Americo

2012-12-31 12:52

developer   ~0064556

I looked at delphi String/DBGrid and has the same behavior as Lazarus, so is not a LCL bug. Seems more a implementation of String/DBGrid issue

Luiz Americo

2012-12-31 15:20

developer   ~0064559

Just as a hint, overriding BeginAutoDrag as below prevents the cursor to change:

procedure TCustomDrawGrid.BeginAutoDrag;

But to support dragging, probably, more drag methods should be implemented

Jesus Reyes

2013-01-17 23:11

developer   ~0064975

I did it as Luiz suggested but only if column resizing is not intended, column moving while dragging is not supported though.

I don't know what methods do you have in mind Luiz, but I added a helper function to DbGrid so it can make some sense of X,Y coords passed to it on OnDragOver/OnDragDrop, this way, X,Y can be converted to TColumn and a row offset to current selected record in case user decide to use DataSet.MoveBy() with it.

Please test.

Krzysztof Dibowski

2013-02-12 17:20

reporter   ~0065645

Working. Thanks!

Issue History

Date Modified Username Field Change
2012-12-30 13:33 Krzysztof Dibowski New Issue
2012-12-30 13:33 Krzysztof Dibowski Widgetset => GTK 2
2012-12-31 02:28 Luiz Americo Note Added: 0064553
2012-12-31 02:28 Luiz Americo Status new => assigned
2012-12-31 02:28 Luiz Americo Assigned To => Luiz Americo
2012-12-31 12:52 Luiz Americo Note Added: 0064556
2012-12-31 12:53 Luiz Americo Assigned To Luiz Americo =>
2012-12-31 15:08 Luiz Americo LazTarget => -
2012-12-31 15:08 Luiz Americo Status assigned => new
2012-12-31 15:20 Luiz Americo Note Added: 0064559
2013-01-17 18:40 Jesus Reyes Status new => assigned
2013-01-17 18:40 Jesus Reyes Assigned To => Jesus Reyes
2013-01-17 23:11 Jesus Reyes Fixed in Revision => 39877
2013-01-17 23:11 Jesus Reyes LazTarget - => 1.2
2013-01-17 23:11 Jesus Reyes Status assigned => resolved
2013-01-17 23:11 Jesus Reyes Fixed in Version => 1.1 (SVN)
2013-01-17 23:11 Jesus Reyes Resolution open => fixed
2013-01-17 23:11 Jesus Reyes Note Added: 0064975
2013-01-17 23:11 Jesus Reyes Target Version => 1.2.0
2013-02-12 17:20 Krzysztof Dibowski Note Added: 0065645
2013-02-12 17:20 Krzysztof Dibowski Status resolved => closed