Drag & Drop to TSGDrawingNavigator (25$ reward :)

Discuss and ask questions about CAD VCL (Delphi and C++ Builder).

Moderators: SDS, support, admin

Post Reply
box_
Posts: 5
Joined: 18 Nov 2010, 19:25

Drag & Drop to TSGDrawingNavigator (25$ reward :)

Post by box_ » 22 Dec 2010, 11:22

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;


support
Posts: 3271
Joined: 30 Mar 2005, 11:36
Contact:

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

Post by support » 23 Dec 2010, 18:15

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.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Post Reply