From fef256b2863b7b6e9ebea8b82831c021b1ab9e94 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Wed, 10 Sep 2014 11:46:42 +0100 Subject: DND demo: report available drop types as soon as possible Irrespective if we accept it or now. This makes the demo useful for testing with DND in general. --- examples/gui/drag_n_drop/dndexample.lpr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/gui') diff --git a/examples/gui/drag_n_drop/dndexample.lpr b/examples/gui/drag_n_drop/dndexample.lpr index c95b97d0..7414eb6c 100644 --- a/examples/gui/drag_n_drop/dndexample.lpr +++ b/examples/gui/drag_n_drop/dndexample.lpr @@ -64,6 +64,7 @@ procedure TMainForm.Edit1DragEnter(Sender, Source: TObject; var s: string; begin + ShowMimeList(AMimeList); s := 'text/plain'; if chkAccept.Checked then Accept := False @@ -73,7 +74,6 @@ begin begin if AMimeChoice <> s then AMimeChoice := s; - ShowMimeList(AMimeList); end; end; @@ -83,6 +83,7 @@ procedure TMainForm.Bevel1DragEnter(Sender, Source: TObject; var s: string; begin + ShowMimeList(AMimeList); { the mime type we want to accept } s := 'text/html'; { if we wil accept the drop, set Accept to True } @@ -93,7 +94,6 @@ begin if AMimeChoice <> s then AMimeChoice := s; - ShowMimeList(AMimeList); Bevel1.BackgroundColor := clRed; end; end; -- cgit v1.2.3-70-g09d2