diff --git a/.gitattributes b/.gitattributes
index 896d48e8a0..3ba30af435 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1155,6 +1155,14 @@ examples/designerbaseclass/example/unit1.lfm svneol=native#text/plain
examples/designerbaseclass/example/unit1.lrs svneol=native#text/plain
examples/designerbaseclass/example/unit1.pas svneol=native#text/plain
examples/dlgform.pp svneol=native#text/pascal
+examples/dropfiles/filesdrop.lpi svneol=native#text/plain
+examples/dropfiles/filesdrop.lpr svneol=native#text/pascal
+examples/dropfiles/unit1.lfm svneol=native#text/plain
+examples/dropfiles/unit1.lrs svneol=native#text/plain
+examples/dropfiles/unit1.pas svneol=native#text/pascal
+examples/dropfiles/unit2.lfm svneol=native#text/plain
+examples/dropfiles/unit2.lrs svneol=native#text/plain
+examples/dropfiles/unit2.pas svneol=native#text/pascal
examples/easter/about.lfm svneol=native#text/plain
examples/easter/about.lrs svneol=native#text/pascal
examples/easter/about.pas svneol=native#text/pascal
@@ -1171,14 +1179,6 @@ examples/exploremenu/exploreidemenu.pas svneol=native#text/plain
examples/exploremenu/frmexploremenu.lfm svneol=native#text/plain
examples/exploremenu/frmexploremenu.lrs svneol=native#text/plain
examples/exploremenu/frmexploremenu.pas svneol=native#text/plain
-examples/filesdrop/filesdrop.lpi svneol=native#text/plain
-examples/filesdrop/filesdrop.lpr svneol=native#text/pascal
-examples/filesdrop/unit1.lfm svneol=native#text/plain
-examples/filesdrop/unit1.lrs svneol=native#text/plain
-examples/filesdrop/unit1.pas svneol=native#text/pascal
-examples/filesdrop/unit2.lfm svneol=native#text/plain
-examples/filesdrop/unit2.lrs svneol=native#text/plain
-examples/filesdrop/unit2.pas svneol=native#text/pascal
examples/fontenum/fontenumeration.lpi svneol=native#text/plain
examples/fontenum/fontenumeration.lpr svneol=native#text/pascal
examples/fontenum/mainunit.lfm svneol=native#text/plain
diff --git a/.gitignore b/.gitignore
index 25b8189bab..b120a0f9d1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -258,11 +258,11 @@ examples/designerbaseclass/example/units
examples/designerbaseclass/lib/*.bak
examples/designerbaseclass/lib/units
examples/designerbaseclass/units
+examples/dropfiles/units[!!-~]*.bak
examples/easter/*.bak
examples/easter/units
examples/exploremenu/*.bak
examples/exploremenu/units
-examples/filesdrop/units[!!-~]*.bak
examples/fontenum/*.bak
examples/fontenum/units
examples/grid_semaphor/*.bak
diff --git a/examples/filesdrop/filesdrop.lpi b/examples/dropfiles/filesdrop.lpi
similarity index 86%
rename from examples/filesdrop/filesdrop.lpi
rename to examples/dropfiles/filesdrop.lpi
index a48f11c21e..976b99d082 100644
--- a/examples/filesdrop/filesdrop.lpi
+++ b/examples/dropfiles/filesdrop.lpi
@@ -5,8 +5,9 @@
+
-
+
@@ -45,8 +46,8 @@
-
-
+
+
@@ -64,26 +65,22 @@
-
-
+
+
-
+
-
+
-
+
-
-
-
-
diff --git a/examples/filesdrop/filesdrop.lpr b/examples/dropfiles/filesdrop.lpr
similarity index 100%
rename from examples/filesdrop/filesdrop.lpr
rename to examples/dropfiles/filesdrop.lpr
diff --git a/examples/filesdrop/unit1.lfm b/examples/dropfiles/unit1.lfm
similarity index 88%
rename from examples/filesdrop/unit1.lfm
rename to examples/dropfiles/unit1.lfm
index e477f1710f..1f99a6dfd7 100644
--- a/examples/filesdrop/unit1.lfm
+++ b/examples/dropfiles/unit1.lfm
@@ -5,10 +5,11 @@ object Form1: TForm1
Width = 701
HorzScrollBar.Page = 700
VertScrollBar.Page = 352
+ ActiveControl = Memo1
Caption = 'On Files Drop event example'
ClientHeight = 353
ClientWidth = 701
- OnFilesDrop = FormFilesDrop
+ OnDropFiles = FormDropFiles
object Label1: TLabel
Left = 13
Height = 14
@@ -32,7 +33,7 @@ object Form1: TForm1
HintPause = 500
HintShortCuts = True
ShowHint = True
- OnFilesDrop = ApplicationProperties1FilesDrop
+ OnDropFiles = ApplicationProperties1DropFiles
left = 126
top = 300
end
diff --git a/examples/dropfiles/unit1.lrs b/examples/dropfiles/unit1.lrs
new file mode 100644
index 0000000000..24272ef8ed
--- /dev/null
+++ b/examples/dropfiles/unit1.lrs
@@ -0,0 +1,16 @@
+{ This is an automatically generated lazarus resource file }
+
+LazarusResources.Add('TForm1','FORMDATA',[
+ 'TPF0'#6'TForm1'#5'Form1'#4'Left'#3'+'#1#6'Height'#3'a'#1#3'Top'#3#155#0#5'Wi'
+ +'dth'#3#189#2#18'HorzScrollBar.Page'#3#188#2#18'VertScrollBar.Page'#3'`'#1#13
+ +'ActiveControl'#7#5'Memo1'#7'Caption'#6#27'On Files Drop event example'#12'C'
+ +'lientHeight'#3'a'#1#11'ClientWidth'#3#189#2#11'OnDropFiles'#7#13'FormDropFi'
+ +'les'#0#6'TLabel'#6'Label1'#4'Left'#2#13#6'Height'#2#14#3'Top'#2#18#5'Width'
+ +#3'('#1#7'Caption'#6'>Drag and drop files on this form and see the results i'
+ +'n memo. '#11'ParentColor'#8#0#0#5'TMemo'#5'Memo1'#4'Left'#2#12#6'Height'#3
+ +#31#1#3'Top'#2'0'#5'Width'#3#154#2#10'ScrollBars'#7#10'ssVertical'#8'TabOrde'
+ +'r'#2#0#0#0#22'TApplicationProperties'#22'ApplicationProperties1'#17'Capture'
+ +'Exceptions'#9#9'HintColor'#7#8'clInfoBk'#13'HintHidePause'#3#196#9#9'HintPa'
+ +'use'#3#244#1#13'HintShortCuts'#9#8'ShowHint'#9#11'OnDropFiles'#7#31'Applica'
+ +'tionProperties1DropFiles'#4'left'#2'~'#3'top'#3','#1#0#0#0
+]);
diff --git a/examples/filesdrop/unit1.pas b/examples/dropfiles/unit1.pas
similarity index 78%
rename from examples/filesdrop/unit1.pas
rename to examples/dropfiles/unit1.pas
index 91f1f060dd..dcace77147 100644
--- a/examples/filesdrop/unit1.pas
+++ b/examples/dropfiles/unit1.pas
@@ -15,9 +15,9 @@ type
ApplicationProperties1: TApplicationProperties;
Label1: TLabel;
Memo1: TMemo;
- procedure ApplicationProperties1FilesDrop(Sender: TObject;
+ procedure ApplicationProperties1DropFiles(Sender: TObject;
const FileNames: array of String);
- procedure FormFilesDrop(Sender: TObject; const FileNames: array of String);
+ procedure FormDropFiles(Sender: TObject; const FileNames: array of String);
private
{ private declarations }
public
@@ -31,16 +31,7 @@ implementation
{ TForm1 }
-procedure TForm1.FormFilesDrop(Sender: TObject; const FileNames: array of String);
-var
- I: Integer;
-begin
- Memo1.Lines.Add(IntToStr(Length(FileNames)) + ' file(s) dropped on ' + Name + ':');
- for I := 0 to High(FileNames) do
- Memo1.Lines.Add(FileNames[I]);
-end;
-
-procedure TForm1.ApplicationProperties1FilesDrop(Sender: TObject;
+procedure TForm1.ApplicationProperties1DropFiles(Sender: TObject;
const FileNames: array of String);
var
I: Integer;
@@ -50,6 +41,15 @@ begin
Memo1.Lines.Add(FileNames[I]);
end;
+procedure TForm1.FormDropFiles(Sender: TObject; const FileNames: array of String);
+var
+ I: Integer;
+begin
+ Memo1.Lines.Add(IntToStr(Length(FileNames)) + ' file(s) dropped on ' + Name + ':');
+ for I := 0 to High(FileNames) do
+ Memo1.Lines.Add(FileNames[I]);
+end;
+
initialization
{$I unit1.lrs}
diff --git a/examples/filesdrop/unit2.lfm b/examples/dropfiles/unit2.lfm
similarity index 92%
rename from examples/filesdrop/unit2.lfm
rename to examples/dropfiles/unit2.lfm
index 0918e0ceb2..991e289321 100644
--- a/examples/filesdrop/unit2.lfm
+++ b/examples/dropfiles/unit2.lfm
@@ -8,7 +8,7 @@ object Form2: TForm2
Caption = 'Form2'
ClientHeight = 56
ClientWidth = 473
- OnFilesDrop = FormFilesDrop
+ OnDropFiles = FormDropFiles
object Label1: TLabel
Left = 13
Height = 14
diff --git a/examples/filesdrop/unit2.lrs b/examples/dropfiles/unit2.lrs
similarity index 85%
rename from examples/filesdrop/unit2.lrs
rename to examples/dropfiles/unit2.lrs
index 71e83a53ec..9b8bbcee11 100644
--- a/examples/filesdrop/unit2.lrs
+++ b/examples/dropfiles/unit2.lrs
@@ -3,8 +3,8 @@
LazarusResources.Add('TForm2','FORMDATA',[
'TPF0'#6'TForm2'#5'Form2'#4'Left'#3#166#1#6'Height'#2'8'#3'Top'#3'P'#2#5'Widt'
+'h'#3#217#1#18'HorzScrollBar.Page'#3#216#1#18'VertScrollBar.Page'#2'7'#7'Cap'
- +'tion'#6#5'Form2'#12'ClientHeight'#2'8'#11'ClientWidth'#3#217#1#11'OnFilesDr'
- +'op'#7#13'FormFilesDrop'#0#6'TLabel'#6'Label1'#4'Left'#2#13#6'Height'#2#14#3
+ +'tion'#6#5'Form2'#12'ClientHeight'#2'8'#11'ClientWidth'#3#217#1#11'OnDropFil'
+ +'es'#7#13'FormDropFiles'#0#6'TLabel'#6'Label1'#4'Left'#2#13#6'Height'#2#14#3
+'Top'#2#18#5'Width'#3'('#1#7'Caption'#6'>Drag and drop files on this form an'
+'d see the results in memo. '#11'ParentColor'#8#0#0#0
]);
diff --git a/examples/filesdrop/unit2.pas b/examples/dropfiles/unit2.pas
similarity index 82%
rename from examples/filesdrop/unit2.pas
rename to examples/dropfiles/unit2.pas
index c9b082d5a6..6433fa3520 100644
--- a/examples/filesdrop/unit2.pas
+++ b/examples/dropfiles/unit2.pas
@@ -13,7 +13,7 @@ type
TForm2 = class(TForm)
Label1: TLabel;
- procedure FormFilesDrop(Sender: TObject; const FileNames: array of String);
+ procedure FormDropFiles(Sender: TObject; const FileNames: array of String);
private
{ private declarations }
public
@@ -30,7 +30,7 @@ uses
{ TForm2 }
-procedure TForm2.FormFilesDrop(Sender: TObject; const FileNames: array of String);
+procedure TForm2.FormDropFiles(Sender: TObject; const FileNames: array of String);
var
I: Integer;
begin
diff --git a/examples/filesdrop/unit1.lrs b/examples/filesdrop/unit1.lrs
deleted file mode 100644
index 2e04b0ebea..0000000000
--- a/examples/filesdrop/unit1.lrs
+++ /dev/null
@@ -1,16 +0,0 @@
-{ This is an automatically generated lazarus resource file }
-
-LazarusResources.Add('TForm1','FORMDATA',[
- 'TPF0'#6'TForm1'#5'Form1'#4'Left'#3'+'#1#6'Height'#3'a'#1#3'Top'#3#155#0#5'Wi'
- +'dth'#3#189#2#18'HorzScrollBar.Page'#3#188#2#18'VertScrollBar.Page'#3'`'#1#7
- +'Caption'#6#27'On Files Drop event example'#12'ClientHeight'#3'a'#1#11'Clien'
- +'tWidth'#3#189#2#11'OnFilesDrop'#7#13'FormFilesDrop'#0#6'TLabel'#6'Label1'#4
- +'Left'#2#13#6'Height'#2#14#3'Top'#2#18#5'Width'#3'('#1#7'Caption'#6'>Drag an'
- +'d drop files on this form and see the results in memo. '#11'ParentColor'#8#0
- +#0#5'TMemo'#5'Memo1'#4'Left'#2#12#6'Height'#3#31#1#3'Top'#2'0'#5'Width'#3#154
- +#2#10'ScrollBars'#7#10'ssVertical'#8'TabOrder'#2#0#0#0#22'TApplicationProper'
- +'ties'#22'ApplicationProperties1'#17'CaptureExceptions'#9#9'HintColor'#7#8'c'
- +'lInfoBk'#13'HintHidePause'#3#196#9#9'HintPause'#3#244#1#13'HintShortCuts'#9
- +#8'ShowHint'#9#11'OnFilesDrop'#7#31'ApplicationProperties1FilesDrop'#4'left'
- +#2'~'#3'top'#3','#1#0#0#0
-]);
diff --git a/lcl/forms.pp b/lcl/forms.pp
index 467219b515..9187de96dd 100644
--- a/lcl/forms.pp
+++ b/lcl/forms.pp
@@ -319,7 +319,7 @@ type
THelpEvent = function(Command: Word; Data: Longint;
var CallHelp: Boolean): Boolean of object;
- TFilesDropEvent = procedure (Sender: TObject; const FileNames: Array of String) of object;
+ TDropFilesEvent = procedure (Sender: TObject; const FileNames: Array of String) of object;
TShortCutEvent = procedure (var Msg: TLMKey; var Handled: Boolean) of object;
@@ -373,7 +373,7 @@ type
FOnCreate: TNotifyEvent;
FOnDeactivate: TNotifyEvent;
FOnDestroy: TNotifyEvent;
- FOnFilesDrop: TFilesDropEvent;
+ FOnDropFiles: TDropFilesEvent;
FOnHelp: THelpEvent;
FOnHide: TNotifyEvent;
FOnShortcut: TShortCutEvent;
@@ -501,7 +501,7 @@ type
procedure AddHandlerCreate(OnCreateHandler: TNotifyEvent; AsLast: Boolean=true);
procedure RemoveHandlerCreate(OnCreateHandler: TNotifyEvent);
function IsShortcut(var Message: TLMKey): boolean; virtual;
- procedure IntfFilesDrop(const FileNames: Array of String);
+ procedure IntfDropFiles(const FileNames: Array of String);
procedure IntfHelp(AComponent: TComponent);
public
// drag and dock
@@ -536,7 +536,7 @@ type
property OnCreate: TNotifyEvent read FOnCreate write FOnCreate;
property OnDeactivate: TNotifyEvent read FOnDeactivate write FOnDeactivate;
property OnDestroy: TNotifyEvent read FOnDestroy write FOnDestroy;
- property OnFilesDrop: TFilesDropEvent read FOnFilesDrop write FOnFilesDrop;
+ property OnDropFiles: TDropFilesEvent read FOnDropFiles write FOnDropFiles;
property OnHelp: THelpEvent read FOnHelp write FOnHelp;
property OnHide: TNotifyEvent read FOnHide write FOnHide;
property OnResize stored IsForm;
@@ -608,7 +608,7 @@ type
property OnDragDrop;
property OnDragOver;
property OnEndDock;
- property OnFilesDrop;
+ property OnDropFiles;
property OnGetSiteInfo;
property OnHide;
property OnKeyDown;
@@ -928,7 +928,7 @@ type
FOnActivate: TNotifyEvent;
FOnDeactivate: TNotifyEvent;
FOnDestroy: TNotifyEvent;
- FOnFilesDrop: TFilesDropEvent;
+ FOnDropFiles: TDropFilesEvent;
FOnHelp: THelpEvent;
FOnHint: TNotifyEvent;
FOnIdle: TIdleEvent;
@@ -1062,7 +1062,7 @@ type
procedure IntfEndSession;
procedure IntfAppMinimize;
procedure IntfAppRestore;
- procedure IntfFilesDrop(const FileNames: Array of String);
+ procedure IntfDropFiles(const FileNames: Array of String);
public
procedure DoEscapeKey(AControl: TWinControl; var Key: Word;
Shift: TShiftState);
@@ -1095,7 +1095,7 @@ type
property OnQueryEndSession: TQueryEndSessionEvent read FOnQueryEndSession write FOnQueryEndSession;
property OnMinimize: TNotifyEvent read FOnMinimize write FOnMinimize;
property OnRestore: TNotifyEvent read FOnRestore write FOnRestore;
- property OnFilesDrop: TFilesDropEvent read FOnFilesDrop write FOnFilesDrop;
+ property OnDropFiles: TDropFilesEvent read FOnDropFiles write FOnDropFiles;
property OnHelp: THelpEvent read FOnHelp write FOnHelp;
property OnHint: TNotifyEvent read FOnHint write FOnHint;
property OnShortcut: TShortcutEvent read FOnShortcut write FOnShortcut;
@@ -1121,7 +1121,7 @@ type
FHintPause: Integer;
FHintShortCuts: Boolean;
FHintShortPause: Integer;
- FOnFilesDrop: TFilesDropEvent;
+ FOnDropFiles: TDropFilesEvent;
FShowHint: Boolean;
FShowMainForm: Boolean;
FTitle: String;
@@ -1157,7 +1157,7 @@ type
Procedure SetOnQueryEndSession(Const AValue : TQueryEndSessionEvent);
Procedure SetOnMinimize(Const AValue : TNotifyEvent);
Procedure SetOnRestore(Const AValue : TNotifyEvent);
- Procedure SetOnFilesDrop(const AValue: TFilesDropEvent);
+ Procedure SetOnDropFiles(const AValue: TDropFilesEvent);
Procedure SetOnHelp(Const AValue : THelpEvent);
Procedure SetOnHint(Const AValue : TNotifyEvent);
Procedure SetOnShowHint(Const AValue : TShowHintEvent);
@@ -1185,7 +1185,7 @@ type
property OnQueryEndSession : TQueryEndSessionEvent read FOnQueryEndSession write SetOnQueryEndSession;
property OnMinimize : TNotifyEvent read FOnMinimize write SetOnMinimize;
property OnRestore : TNotifyEvent read FOnRestore write SetOnRestore;
- property OnFilesDrop: TFilesDropEvent read FOnFilesDrop write SetOnFilesDrop;
+ property OnDropFiles: TDropFilesEvent read FOnDropFiles write SetOnDropFiles;
property OnHelp: THelpEvent read FOnHelp write SetOnHelp;
property OnHint: TNotifyEvent read FOnHint write SetOnHint;
property OnShowHint: TShowHintEvent read FOnShowHint write SetOnShowHint;
diff --git a/lcl/include/application.inc b/lcl/include/application.inc
index 4ddec2e969..bfbe276f98 100644
--- a/lcl/include/application.inc
+++ b/lcl/include/application.inc
@@ -1450,15 +1450,15 @@ begin
end;
{------------------------------------------------------------------------------
- Method: TApplication.IntfFilesDrop
+ Method: TApplication.IntfDropFiles
Params: FileNames - Dropped files
- Invokes OnFilesDropEvent of the application.
+ Invokes OnDropFilesEvent of the application.
This function is called by the interface.
------------------------------------------------------------------------------}
-procedure TApplication.IntfFilesDrop(const FileNames: array of String);
+procedure TApplication.IntfDropFiles(const FileNames: array of String);
begin
- if Assigned(FOnFilesDrop) then FOnFilesDrop(Self, FileNames);
+ if Assigned(FOnDropFiles) then FOnDropFiles(Self, FileNames);
end;
{------------------------------------------------------------------------------
diff --git a/lcl/include/applicationproperties.inc b/lcl/include/applicationproperties.inc
index 33d0928c61..168e28df9b 100644
--- a/lcl/include/applicationproperties.inc
+++ b/lcl/include/applicationproperties.inc
@@ -163,12 +163,12 @@ begin
Application.OnRestore := AValue;
end;
-Procedure TApplicationProperties.SetOnFilesDrop(const AValue: TFilesDropEvent);
+Procedure TApplicationProperties.SetOnDropFiles(const AValue: TDropFilesEvent);
begin
- FOnFilesDrop := AValue;
+ FOnDropFiles := AValue;
If not (csDesigning in ComponentState) then
- Application.OnFilesDrop := AValue;
+ Application.OnDropFiles := AValue;
end;
Procedure TApplicationProperties.SetOnHelp(Const AValue : THelpEvent);
diff --git a/lcl/include/customform.inc b/lcl/include/customform.inc
index a0b3e0e2d7..2f3b35e5e8 100644
--- a/lcl/include/customform.inc
+++ b/lcl/include/customform.inc
@@ -1687,15 +1687,15 @@ begin
end;
{------------------------------------------------------------------------------
- Method: TCustomForm.IntfFilesDrop
+ Method: TCustomForm.IntfDropFiles
Params: FileNames - Dropped files
- Invokes OnFilesDropEvent of the form.
+ Invokes OnDropFilesEvent of the form.
This function is called by the interface.
------------------------------------------------------------------------------}
-procedure TCustomForm.IntfFilesDrop(const FileNames: array of String);
+procedure TCustomForm.IntfDropFiles(const FileNames: array of String);
begin
- if Assigned(FOnFilesDrop) then FOnFilesDrop(Self, FileNames);
+ if Assigned(FOnDropFiles) then FOnDropFiles(Self, FileNames);
end;
{------------------------------------------------------------------------------
diff --git a/lcl/interfaces/win32/win32callback.inc b/lcl/interfaces/win32/win32callback.inc
index a1e528ee1f..75f703272f 100644
--- a/lcl/interfaces/win32/win32callback.inc
+++ b/lcl/interfaces/win32/win32callback.inc
@@ -809,35 +809,43 @@ Var
procedure HandleSpinEditChange(ASpinEdit: TCustomFloatSpinEdit);
var
lWindowInfo: PWindowInfo;
- lNewValue: single;
+ NewValue: single;
begin
lWindowInfo := GetWindowInfo(ASpinEdit.Handle);
if lWindowInfo = @DefaultWindowInfo then exit;
- lNewValue := StrToFloatDef(ASpinEdit.Text, lWindowInfo^.spinValue);
- if lNewValue <> lWindowInfo^.spinValue then
+
+ NewValue := StrToFloatDef(ASpinEdit.Text, lWindowInfo^.spinValue);
+ if (ASpinEdit.MaxValue > ASpinEdit.MinValue) then
begin
- lWindowInfo^.spinValue := lNewValue;
- LMessage.Msg := CM_TEXTCHANGED;
+ if NewValue > ASpinEdit.MaxValue then
+ NewValue := ASpinEdit.MaxValue;
+ if NewValue < ASpinEdit.MinValue then
+ NewValue := ASpinEdit.MinValue;
end;
+ lWindowInfo^.spinValue := NewValue;
+
+ LMessage.Msg := CM_TEXTCHANGED;
end;
procedure HandleSpinEditDeltaPos(AUpDownMsg: PNMUpDown);
var
- lSpinEdit: TCustomFloatSpinEdit;
+ SpinEdit: TCustomFloatSpinEdit;
spinHandle: HWND;
newValue: single;
begin
- lSpinEdit := TCustomFloatSpinEdit(WindowInfo^.WinControl);
- newValue := WindowInfo^.spinValue + AUpDownMsg^.iDelta * lSpinEdit.Increment;
- if (lSpinEdit.MinValue <> 0) or (lSpinEdit.MaxValue <> 0) then
+ SpinEdit := TCustomFloatSpinEdit(WindowInfo^.WinControl);
+ if SpinEdit.ReadOnly then Exit;
+
+ newValue := WindowInfo^.spinValue + AUpDownMsg^.iDelta * SpinEdit.Increment;
+ if (SpinEdit.MaxValue > SpinEdit.MinValue) then
begin
- if newValue > lSpinEdit.MaxValue then
- newValue := lSpinEdit.MaxValue;
- if newValue < lSpinEdit.MinValue then
- newValue := lSpinEdit.MinValue;
+ if newValue > SpinEdit.MaxValue then
+ newValue := SpinEdit.MaxValue;
+ if newValue < SpinEdit.MinValue then
+ newValue := SpinEdit.MinValue;
end;
spinHandle := AUpDownMsg^.hdr.hwndFrom;
- UpdateFloatSpinEditText(spinHandle, NewValue, lSpinEdit.DecimalPlaces);
+ UpdateFloatSpinEditText(spinHandle, NewValue, SpinEdit.DecimalPlaces);
Windows.SendMessage(spinHandle, UDM_SETPOS32, 0, 500);
WindowInfo^.spinValue := newValue;
end;
@@ -978,9 +986,9 @@ Var
if Length(Files) > 0 then
begin
if lWinControl is TCustomForm then
- (lWinControl as TCustomForm).IntfFilesDrop(Files);
+ (lWinControl as TCustomForm).IntfDropFiles(Files);
if Application <> nil then
- Application.IntfFilesDrop(Files);
+ Application.IntfDropFiles(Files);
end;
finally
DragFinish(Drop);
diff --git a/lcl/interfaces/win32/win32wsforms.pp b/lcl/interfaces/win32/win32wsforms.pp
index a439b0d0e9..0a09ba4dca 100644
--- a/lcl/interfaces/win32/win32wsforms.pp
+++ b/lcl/interfaces/win32/win32wsforms.pp
@@ -257,7 +257,7 @@ begin
FinishCreateWindow(AWinControl, Params, false);
// TODO: proper icon, for now set default icon
SetIcon(TCustomForm(AWinControl), 0);
- // enable accepting files drop
+ // enable accepting drop files
DragAcceptFiles(Params.Window, True);
Result := Params.Window;
end;