Step 1 - Create the Projects (Object Pascal)
Start with a clean slate by closing all files in Appmethod (File > Close All). Choose a location and name for a new folder to hold all the component files.
- Select File > New > Package - Object Pascal.
- 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 Object Pascal 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.dproj 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 DialogButtons.pas 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 Object Pascal 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 are saving 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.