Back to Styles
The style designer is a component of the Delphi IDE which can be used to edit FireMonkey styles. There are three ways to invoke the style designer:
1) Right-click on a component and select Edit Default Style. This loads the current default style for the component into the forms style book and opens the editor. The style will have the same style name as the default style and will override the default style for all components on the form of the same class which do not have a StyleLookup set. This option is not available for mobile development.
2) Right-click on a component and select Edit Custom Style. This loads the current style for the component into the editor. If the component is currently using the default style (i.e. no StyleLookup has been set) the designer will load a copy of the default style and give it a unique style name. This new style will apply to the current component. You can also set the StyleLookup of other components to the StyleName of this style and they will also use the style. This option is not available for mobile development.
3) Double-click on a TStyleBook component on the form. You can use this method to create styles from scratch. It is also the only way to enter the style designer when working on a mobile app. If you have already edited a style on the for using one of the above methods Delphi will have added and set up a style book component for you. If not you can add one manually from the component palette. You will also need to set the form’s StyleBook property to point to it.
Tour of the Designer
The structure pane shows all the style elements within the file/book. Expanding an element shows the objects which make up the style. To delete an item select it and click the button with a red X just under the title bar of the structure pane.
The preview shows a visual preview of the style. This is similar to the form view in the form designer except that you cannot select, drag or resize the objects in the preview: the preview is strictly read only.
The property editor allows you to view and edit the properties if the objects making up the style. This is the same as the property editor in the form designer.
The component palette provides a searchable list of the available components and other objects. Again this is similar to that in the form designer with the exception that in order to add a new component to the style you need to drag it onto the structure pane. Dragging onto or clicking the preview window will not work. Neither will double clicking.