Drag & Drop to TSGDrawingNavigator (25$ reward :)
Posted: 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).
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;