View Issue Details

IDProjectCategoryView StatusLast Update
0002733JEDI VCL00 JVCL Componentspublic2005-11-22 09:17
ReportermarcgeldonAssigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionopen 
Product Version3.00 BETA 2 
Target VersionFixed in Version 
Summary0002733: JvDBTreeView - ReadOnly does not work on Drag'n'Drop
DescriptionIf JvDBTreeView is set to ReadOnly = True, it's possible to drag and drop the treenodes and JvDBTreeView tries to change things in the connected dataset.


Best wishes from Germany,

Marc Geldon
(PRO IT SYSTEMS -> www.proitsystems.de)

TagsNo tags attached.

Relationships

parent of 0003214 resolvedAHUser Different TJvDBTreeView bugs (with bugfix) 
related to 0002725 closed JvDBTreeVIew - Bug in procedure DeleteNode 

Activities

marcgeldon

2005-03-10 00:32

reporter   ~0006666

Here is the procedure which has to be changed. We have to check in "DragOver" if the component is set to readonly. This is done now here:

+++++++++++++++++++++++++++++++++++++++
procedure TJvCustomDBTreeView.DragOver(Source: TObject; X, Y: Integer;
  State: TDragState; var Accept: Boolean);
var
  Node: TTreeNode;
  HT: THitTests;
begin
  inherited DragOver(Source, X, Y, State, Accept);

  if (ValidDataSet and
    (DragMode = dmAutomatic) and
    (not FDataLink.ReadOnly) and
    (not ReadOnly) and
    (not Accept)) then
  begin
    HT := GetHitTestInfoAt(X, Y);
    Node := GetNodeAt(X, Y);
    Accept := (Source = Self) and Assigned(Selected) and
      (Node <> Selected) and Assigned(Node) and
      not Node.HasAsParent(Selected) and
      (HT - [htOnLabel, htOnItem, htOnIcon, htNowhere, htOnIndent, htOnButton] <> HT);
    YDragPos := Y;
    TimerDnD.Enabled := ((Y < DnDScrollArea) or (Y > ClientHeight - DnDScrollArea));
  end;
end;
+++++++++++++++++++++++++++++++++++++++

marcgeldon

2005-03-10 00:55

reporter   ~0006669

TAKE THE ATTACHED FILE! It has the correct DeleteNode and DragOver procedure. Please check and respond. Thank you very much in advance.

2005-03-10 00:56

 

JvDBTreeView.pas (39,175 bytes)

obones

2005-05-18 09:42

administrator   ~0007224

Could you elaborate a bit more?
Ideally, a small demo application would be even better.
Thanks

marcgeldon

2005-05-22 09:41

reporter   ~0007299

I have told everything you need to know. If you know the JvDBTreeView, it should be no problem.

If you still need further informations, contact me!

Please don't forget: it's a heavy bug on that component!


Best wishes from Germany,

Marc Geldon
(PRO IT SYSTEMS)

obones

2005-05-24 08:29

administrator   ~0007337

Yeah well, I don't use DB related components usually in my applications, and I've never really used the JvDBTreeview.
Further to this, if I ask you to create a sample application, it is to make you help us pinpoint where the problem lies.
I understand it is easier to simply tell me to "find for myself", but thing is, I don't have enough time to simply figure out a simple way to reproduce the bug, while you, as a user can do this.

marcgeldon

2005-09-22 04:08

reporter   ~0007955

This bug does still exist. I will create a demo application for you and merge my changes into the actual source code from today.

marcgeldon

2005-09-22 05:51

reporter   ~0007960

ATTENTION! This bug is no longer actual. Check out bug no. 0003214 with different bugs I found on the component "JvDBTreeView".

obones

2005-11-22 09:17

administrator   ~0008137

See 3214

Issue History

Date Modified Username Field Change
2005-03-10 00:08 marcgeldon New Issue
2005-03-10 00:32 marcgeldon Note Added: 0006666
2005-03-10 00:55 marcgeldon Note Added: 0006669
2005-03-10 00:56 marcgeldon File Added: JvDBTreeView.pas
2005-05-18 09:42 obones Note Added: 0007224
2005-05-18 09:42 obones Status new => feedback
2005-05-18 09:42 obones Relationship added related to 0002725
2005-05-22 09:41 marcgeldon Note Added: 0007299
2005-05-24 08:29 obones Note Added: 0007337
2005-09-22 04:08 marcgeldon Note Added: 0007955
2005-09-22 05:51 marcgeldon Note Added: 0007960
2005-11-22 09:17 obones Relationship added parent of 0003214
2005-11-22 09:17 obones Status feedback => closed
2005-11-22 09:17 obones Note Added: 0008137