[Lazarus] How to clone a component
nc-gaertnma at netcologne.de
Fri Oct 5 10:21:00 CEST 2012
patspiper <patspiper at gmail.com> hat am 5. Oktober 2012 um 09:56 geschrieben:
> On 05/10/12 09:46, Mattias Gaertner wrote:
> > On Thu, 04 Oct 2012 15:08:31 +0300
> > patspiper <patspiper at gmail.com> wrote:
> >> On 04/10/12 10:45, patspiper wrote:
> >>> On 04/10/12 09:57, patspiper wrote:
> >>> I have gathered the following presumed bugs: 1-
> >>> TClipboard.GetComponent uses pcfComponent while
> >>> TClipboard.SetComponent uses pcfCustomData instead.
> > Please report this bug.
> Done: http://bugs.freepascal.org/view.php?id=23060
> >> 2- Clipboard.SetComponent/GetComponent do not save/restore events.
> >> Events are nil. This is the clipboard text of a button with an assigned
> >> OnClick event (note the missing OnClick):
> >> object Button1: TButton
> >> Left = 24
> >> Height = 25
> >> Top = 16
> >> Width = 139
> >> Caption = 'Button1'
> >> Font.Height = -20
> >> Font.Name = 'Sans'
> >> ParentFont = False
> >> TabOrder = 0
> >> end
> > Are you sure that Delphi SetComponent writes events?
> No. But I was assuming that events would be written as is the case with
> object Button1: TButton
> Left = 68
> Height = 25
> Top = 29
> Width = 75
> Caption = 'Button1'
> OnClick = Button1Click <---------
> TabOrder = 0
The Button1Click is a method of the form or a nested frame, not the Button1. The
streaming need some extra params to handle events.
More information about the Lazarus