diff --git a/components/richmemo/richmemo.pas b/components/richmemo/richmemo.pas index eea6fc08b..4523deb4a 100644 --- a/components/richmemo/richmemo.pas +++ b/components/richmemo/richmemo.pas @@ -298,6 +298,5 @@ begin Result := false; end; - end. diff --git a/components/richmemo/richmemofactory.pas b/components/richmemo/richmemofactory.pas index 56ab557f4..03d3fd8a3 100644 --- a/components/richmemo/richmemofactory.pas +++ b/components/richmemo/richmemofactory.pas @@ -7,22 +7,27 @@ interface uses WSLCLClasses, - RichMemo + RichMemo, + WSRichMemo {$ifdef LCLWin32},Win32RichMemo{$endif} {$ifdef LCLCarbon},CarbonRichMemo{$endif} {$ifdef LCLGtk2},Gtk2RichMemo{$endif} ; function RegisterCustomRichMemo: Boolean; - + implementation function RegisterCustomRichMemo: Boolean; alias : 'WSRegisterCustomRichMemo'; +var + cls : TWSLCLComponentClass; begin + Result := True; {$ifdef LCLWin32}RegisterWSComponent(TCustomRichMemo, TWin32WSCustomRichMemo);{$endif} {$ifdef LCLCarbon}RegisterWSComponent(TCustomRichMemo, TCarbonWSCustomRichMemo);{$endif} {$ifdef LCLGtk2}RegisterWSComponent(TCustomRichMemo, TGtk2WSCustomRichMemo);{$endif} - Result := False; + cls:=FindWSComponentClass(TCustomRichMemo); + if not Assigned(cls) then RegisterWSComponent(TCustomRichMemo, TWSCustomRichMemo); end; diff --git a/components/richmemo/samples/testsimple/project1.lpi b/components/richmemo/samples/testsimple/project1.lpi index 056218530..579b40051 100644 --- a/components/richmemo/samples/testsimple/project1.lpi +++ b/components/richmemo/samples/testsimple/project1.lpi @@ -6,10 +6,10 @@ - + - + @@ -32,14 +32,18 @@ - + - - + + + + + + @@ -47,94 +51,95 @@ - - + + + - + - + - + - + - + - + - + - + - + - + - + - + @@ -144,8 +149,8 @@ - + @@ -155,274 +160,302 @@ - + - + - + - + - + - + - + - + - + - + - + - + - - + + + + + - + - + - + - + - + - + - + - + - + - + - + - - + + + - + - + - + - - + + - - + + - - + + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -487,6 +520,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/components/richmemo/samples/testsimple/project1.lpr b/components/richmemo/samples/testsimple/project1.lpr index a381d4e08..f484b4d76 100644 --- a/components/richmemo/samples/testsimple/project1.lpr +++ b/components/richmemo/samples/testsimple/project1.lpr @@ -9,8 +9,6 @@ uses Interfaces, // this includes the LCL widgetset Forms, Unit1, richmemopackage; -{$IFDEF WINDOWS}{$R project1.rc}{$ENDIF} - begin Application.Initialize; Application.CreateForm(TForm1, Form1);