Hi!!
Attached the code of my prototype of TDBCtrlGrid. It works as expected on
Delphi (except the function GetDesignerDropTarget that don't exists on
Delphi TWinControl), but it don't works as expected on Lazarus.
2014-03-03 10:17 GMT-03:00 Fabio Luis Girardi <[email protected]>:
> Hi Mattias!!
>
> Revision 44299 is related with this?
>
>
> The best regards
>
>
> 2014-02-28 7:56 GMT-03:00 Mattias Gaertner <[email protected]>:
>
> On Fri, 28 Feb 2014 01:47:38 +0100
>> Hans-Peter Diettrich <[email protected]> wrote:
>>
>> >[...]
>> > Component Drag&Drop operations
>>
>> There is no drag when adding a component to a form.
>>
>> Mattias
>>
>>
>> --
>> _______________________________________________
>> Lazarus mailing list
>> [email protected]
>> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>>
>
>
>
> --
> The best regards,
>
> Fabio Luis Girardi
> PascalSCADA Project
> http://sourceforge.net/projects/pascalscada
> http://www.pascalscada.com
>
--
The best regards,
Fabio Luis Girardi
PascalSCADA Project
http://sourceforge.net/projects/pascalscada
http://www.pascalscada.com
unit mytest;
interface
{$mode objfpc}{$H+}
uses
SysUtils, Classes, Controls, ExtCtrls;
type
{ TMyTest }
TMyTestChildContainer = class(TPanel);
TMyTest = class(TWinControl)
private
FChildContainerPanel:TMyTestChildContainer;
protected
function GetChildParent: TComponent; override;
public
constructor Create(AOwner:TComponent); override;
destructor Destroy; override;
function GetDesignerDropTarget(aComponent: TComponentClass): TWinControl;
override;
procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override;
published
{ Published declarations }
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('Samples', [TMyTest]);
end;
{ TMyTest }
constructor TMyTest.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
ControlStyle:=ControlStyle-[csAcceptsControls];
FChildContainerPanel:=TMyTestChildContainer.Create(Self);
FChildContainerPanel.ControlStyle := [csAcceptsControls, csClickEvents,
csReplicatable, csOpaque];
FChildContainerPanel.Parent:=Self;
FChildContainerPanel.Align:=alTop;
FChildContainerPanel.Height:=40;
Height:=120;
end;
destructor TMyTest.Destroy;
begin
FreeAndNil(FChildContainerPanel);
inherited;
end;
function TMyTest.GetChildParent: TComponent;
begin
Result:=FChildContainerPanel;
end;
procedure TMyTest.GetChildren(Proc: TGetChildProc; Root: TComponent);
begin
FChildContainerPanel.GetChildren(Proc,Root);
end;
function TMyTest.GetDesignerDropTarget(aComponent: TComponentClass
): TWinControl;
begin
Result:=FChildContainerPanel;
end;
end.
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus