Step 1 - Create the Projects (C++)
Start with a clean slate by closing all files in the IDE (File > Close All). Choose a location and name for a new folder to hold all the component files.
- Select File > New > Package - C++Builder
- Select File > Save Project As and navigate to the folder location. Create a new folder, navigate to it, and save the project as DialogButtonsPackage
- Right-click the newly created project group in the Project Manager and select Save Project Group As. Save as DialogButtonsGroup in the same directory.
Choose Component > New Component to open the New Component wizard. In its pages:
- Choose FireMonkey for C++ as the framework and personality.
- Select TStyledControl as the ancestor.
- Set the class name to TDialogButtonPanel. For the unit name, click the ellipsis, make sure you are in the component folder, and save the unit file name as DialogButtons.
- Choose Add unit to DialogButtonsPackage.cbproj project and Finish.
- If prompted to Save DialogButtons As, click Save.
- If prompted to enable the FireMonkey framework, click Yes.
This creates a unit with the component class, and a Register procedure to add that class to the component palette. Make sure that the DialogButtonsPackage.h file is added to the package. It should be visible in the project tree under the Contains node.
- Right-click the project group and choose Add New Project.
- In the New Items dialog box, select C++Builder Projects > Multi-Device Application > Blank Application.
- Select File > Save As, navigate to the component folder, and save the form unit as PanelTest.
- Select File > Save Project As, ensure you're in the component folder, and save the project as PanelTester.
- Right-click the project, select Add New > Multi-Device Form > HD Form. Save the unit as TestDialog.
- Right-click the project, select Add New > Multi-Device Form > HD Form. Save the unit as PanelDesign.