Procedure

TfrmConsults.tvCsltNotesDragOver

Module

fConsults

Last Modified

7/15/2014 3:26:34 PM

Visibility

Public/Published

Owner

TfrmConsults

Declaration

procedure tvCsltNotesDragOver(Sender, Source: TObject; X, Y: Integer;
  State: TDragState; var Accept: Boolean);


Source

4295  procedure TfrmConsults.tvCsltNotesDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
4296  var
4297    AnItem: TORTreeNode;
4298  begin
4299    Accept := False;
4300    if not uIDNotesActive then exit;
4301    AnItem := TORTreeNode(tvCsltNotes.GetNodeAt(X, Y));
4302    if (AnItem = nil) or (AnItem.ImageIndex in [IMG_GROUP_OPEN, IMG_GROUP_SHUT, IMG_TOP_LEVEL]) then Exit;
4303    with tvCsltNotes.Selected do
4304      if (ImageIndex in [IMG_SINGLE, IMG_PARENT, IMG_ID_CHILD, IMG_ID_CHILD_ADD]) then
4305        Accept := (AnItem.ImageIndex in [IMG_SINGLE, IMG_PARENT,
4306                                         IMG_IDNOTE_OPEN, IMG_IDNOTE_SHUT,
4307                                         IMG_IDPAR_ADDENDA_OPEN, IMG_IDPAR_ADDENDA_SHUT])
4308      else if (ImageIndex in [IMG_IDNOTE_OPEN, IMG_IDNOTE_SHUT, IMG_IDPAR_ADDENDA_OPEN, IMG_IDPAR_ADDENDA_SHUT]) then
4309        Accept := (AnItem.ImageIndex in [IMG_GROUP_OPEN, IMG_GROUP_SHUT, IMG_TOP_LEVEL])
4310      else if (ImageIndex in [IMG_ADDENDUM, IMG_GROUP_OPEN, IMG_GROUP_SHUT, IMG_TOP_LEVEL]) then
4311        Accept := False;
4312  end;