trichview.com

trichview.support




Re: Drag and Drop file into the table...


Return to index


Author

Message

Sergey Tkachenko

Posted: 12/10/2002 21:43:15


May be this is a problem of beta version?

Please upgrade to 1.7


I tried to modify demo

Demos\Delphi\Assorted\Graphics\DragImg:


var sn: Integer = 0;


procedure TForm1.RichViewEdit1DragDrop(Sender, Source: TObject; X,

  Y: Integer);

var

    table: TRVTableItemInfo;

    item: TCustomRVItemInfo;

    rve: TCustomRichViewEdit;

    r,c: Integer;

begin

  MoveCaretTo(X, Y);


  if RichViewEdit1.GetCurrentItemEx(TRVTableItemInfo, rve, item) then begin

    table := TRVTableItemInfo(item);

    if table.GetEditedCell(r,c)<>nil then begin

      rve.TopLevelEditor.SelectAll;

      rve.TopLevelEditor.InsertText(IntToStr(sn));

      // Format is not required after InsertText

      inc(sn);

    end;

  end;


end;


And it works





Powered by ABC Amber Outlook Express Converter