Question
“How can I add a custom tool window to the Designer?”
Solution
The example shows how to create a custom tool window and register it with the Design tools.
Download: DesignerAddToolWindow.zip
Sample Delphi code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
uses ppDesignToolWindow, ppToolbarTBX; type // descend from TppDesignToolWindow TmyDesignToolWindow = class(TppDesignToolWindow) public constructor Create(Owner: TComponent); override; end; implementation constructor TmyDesignToolWindow.Create(Owner: TComponent); begin inherited; Caption := 'My ToolWindow'; end; // register/unregister the tool window initialization TppToolWindowFactory.Register(TmyDesignToolWindow); finalization TppToolWindowFactory.UnRegister(TmyDesignToolWindow); end; |