Page 1 of 1

Drag & Drop to TSGDrawingNavigator (25$ reward :)

Posted: 22 Dec 2010, 11:22
by box_
Hello,

am sorry for making another topic, but it would be very important and this time i make it more clear. Yes i would pay 25$ on paypal if somebody can help. :)

Tried to program the sPanel_layout's (TsPanel) events ('OnDragDrop' and 'OnDragOver') but nothing happens. So how could i activate event handling (dragover) on a TSGDrawingNavigator?
I need the mouse X,Y coordinates when drag&drop on the drawingnavigator (then create an entity at the given location).

Code: Select all

type
  TForm1 = class(TForm)
  private
    FsgPaintBox: TsgDrawingNavigator;
  public
    property sgPaintBox: TsgDrawingNavigator read FsgPaintBox;

procedure TForm1.FormCreate(Sender: TObject);
begin
  FsgPaintBox := TSGDrawingNavigator.Create(Self);
  FsgPaintBox.Parent := sPanel_layout;
  FsgPaintBox.AutoFocus := True;
  FsgPaintBox.RectZooming := True;
  FsgPaintBox.Align := alClient;
end;

Code: Select all

procedure TForm1.sPanel_layoutDragDrop(Sender, Source: TObject; X,
  Y: Integer);
begin
  ShowMessage('drag&drop ok!');    //later get the coordinates here
end;

procedure TForm1.sPanel_layoutDragOver(Sender, Source: TObject; X,
  Y: Integer; State: TDragState; var Accept: Boolean);
begin
  Accept := Source is TVirtualStringTree;
end;


Re: Drag & Drop to TSGDrawingNavigator (25$ reward :)

Posted: 23 Dec 2010, 18:15
by support
Hello.
This isn't the matter of reward. The code that you posted will work within one application. You can find more info at this page:
http://www.blong.com/Conferences/BorCon ... p/4114.htm
...VCL drag and drop support does not extend to inter-application dragging (you must use Windows COM programming to achieve this)...

Alexander.