"Add to Library" is dimmed! Why?

I have been spending hours to figure out how getting Library Manager in my form. Here what I did:
ForceCurrentDirectory := true;
DgrLibraryFolderFiler1.BaseFolder :=
ExcludeTrailingPathDelimiter(ExtractFilePath(Application.ExeName)) + '\Libraries';
Application.ShowMainForm := false;
//DiagramEditor1.OnCreateDesigner := EditorCreate;

Every thing goes fine and the editor opens but without showing the Library manger section. Even If I try to copy a group of blocks by clicking on the Right mouse, it happens that the option "Add to library" is dimmed inside the popupmenu. Please What did I miss?

I don't know. It works fine here, with your exact code. See project attached.

TestLibraryManager.zip (5.9 KB)

Thank you for reply
I invite you to do this:
Open new Vcl Project(Iam working with Delphi 10 Seattle.
Add the component: AtDiagram1 , dgrlibraryFolderfiler, fgrlibrarymanager
Past the below lines in the oncreate Page event of the form:
DgrLibraryFolderFiler1.BaseFolder := ExcludeTrailingPathDelimiter(ExtractFilePath(Application.ExeName)) + '\Libraries';
** DgrLibraryManager1.LoadLibraries;**
** RegisterGraphicFileFormats(DefaultGraphicLib);**
** Application.ShowMainForm := false;**
** DiagramEditor1.Execute;**

You probably should add dgrClasses to uses units
Run the program!!!

  1. LibraryManageer section under Layer section is absent
  2. if you try to add a grouped blocks by RightMouse clicking, the option" add to library is dimmed!!
    I still don't understand!

I have sent you the test project, did you bother to open it? It has the source code you sent me. It works. Please continue from there and let me know how it goes, thank you.

i don't see any link to the code you say you sent. Probably you have forgetten to do that. Any way I am very grateful for the effort you did for me!

The project is in this response: "Add to Library" is dimmed! Why? - #2 by wlandgraf


Yes!. It seems I forgot to assign diagrameditor1.LibManager to DgrLibraryManager1... now my project is exactly simillar to the one you sent to me.
I appriciate as as always your valuable support!
Thank you ver much

1 Like

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.