On Wed, Jan 12, 2011 at 3:26 PM, Mattias Gaertner <[email protected]> wrote: > On Wed, 12 Jan 2011 15:00:51 -0300 > Marcos Douglas <[email protected]> wrote: > >> 2011/1/12 Mattias Gaertner <[email protected]>: >> >> But I can register a component called TButton? >> > >> > No, that would conflict with the LCL TButton. See the FCL function >> > FindClass. >> >> I know. >> >> >> Because that I proposed the Lazarus put the unit name in the code, >> >> automatic... >> > Just use the right unit order. >> >> What is that mean? > > It means, that instead of > > use StdCtrls, MyEdit; > > TForm1 = class(TForm) > e1: StdCtrls.TEdit; > e2: StdCtrls.TEdit; > e3: StdCtrls.TEdit; > e4: StdCtrls.TEdit; > end; > > .. you can simply use: > > use MyEdit, StdCtrls; > > TForm1 = class(TForm) > e1: TEdit; > e2: TEdit; > e3: TEdit; > e4: TEdit; > end;
Ah, okay, I remembered this... but in Delphi I used <StdCtrls, MyEdit> instead of <MyEdit, StdCtrls>. Right to Left, no? Anyway... this is a "hack" not a "pure" implementation. You use the design time of TButton (LCL) but in runtime the button will behave differently. I think this is not a good idea (I used this hack to extend the default components in Delphi, e.g., coloring the all TDBGrid's lines in a project). Marcos Douglas -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
