File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ TFormMain = class(TForm)
160160implementation
161161
162162uses
163- UITypes;
163+ UITypes, System.Win.Registry, UIRibbonUtils ;
164164
165165{ $R *.dfm}
166166
@@ -367,6 +367,15 @@ procedure TFormMain.CMShowingChanged(var Msg: TMessage);
367367constructor TFormMain.Create(AOwner: TComponent);
368368begin
369369 inherited ;
370+ // Write the path to the Ribbon Designer to the registry, so that the designtime package knows where to find it. Issue #22
371+ With TRegistry.Create do
372+ try
373+ OpenKey(cRegistryPath, True);
374+ WriteString(cRegistryKeyDesigner, ParamStr(0 ));
375+ finally
376+ Free;
377+ end ;
378+
370379 FDocument := TRibbonDocument.Create;
371380 FCompiler := TRibbonCompiler.Create;
372381 FCompiler.OnMessage := RibbonCompilerMessage;
Original file line number Diff line number Diff line change @@ -15,6 +15,14 @@ function ColorToHsb(const Color: TColor): TUIHsbColor;
1515
1616function CreateStringFromResource (const ResourceId: Integer): String;
1717
18+
19+ const
20+ cPackageTitle = ' Ribbon Framework' ;
21+ cRegistryPath = ' Software\Embarcadero\' + cPackageTitle;
22+ cRegistryKeyDesigner = ' RibbonDesigner' ;
23+
24+
25+
1826implementation
1927
2028uses
You can’t perform that action at this time.
0 commit comments