To change the height of the title bar, turn off SystemHeight, which constrains the title bar to the default system height. Height: Height of the title bar in pixels.Enabled: Activates or inactivates the use of the custom title bar.See the below section about custom controls on a title bar. Control: Set this to a TTitleBarPanel that is placed on the form.Windows 10 draws on the left by default you can draw the caption centered like Windows 8 or right-aligned. CaptionAlignment: Use this to specify where the caption is drawn.The following settings control the behavior of the title bar, as well as controlling some common painting scenarios (such as not painting the title bar caption), which lets you address these scenarios without implementing full custom painting. Note that you may also want to make your form´s Height larger to account for the space previously used by the title bar. We recommend you place controls on your form on a client-aligned TPanel. absolute positioning, will remain where it is and so it may overlap the title bar, and needs to have its position adjusted when the custom title bar is enabled. However, any control placed via Left and Top properties, i.e. See ClientRect, ClientWidth, and ClientHeight for more information.)Īll controls parented to the form with an Align property, such as alTop, will adjust to the title bar area correctly. (The client area is the space where you normally place VCL controls, and the non-client area is the space usually used by the system title bar, system-provided main menu wrapped by a TMainMenu, scroll bars, and resizing border. The title bar is implemented through DwmExtendFrameIntoClientArea function, meaning that there is no non-client area to your form, and the title bar will be rendered using both the client and the non-client area. This represents the area of the form which will be used for the title bar. Notice that the top of your VCL form in the designer will now have a shaded blue area. To enable title bar customization, set to True. This allows you to change basic properties, such as displaying the caption or icon, as well as controlling the more advanced features including placing controls. The VCL TForm class has a new property, CustomTitleBar. Basically, the TForm.CustomTitleBar property represents settings for the form title bar, and the TTitleBarPanel is a VCL control used to represent and access advanced features in the title bar itself.Īttention: VCL Styles other than Platform will not work in the title bar. The panel is used to host VCL controls, but it is also required to enable advanced features such as customizing painting, even if you have no custom controls on the title bar. To utilize the full power of the custom title bar, you must use a combination of the TForm.CustomTitleBar property and a TTitleBarPanel placed on the form. This is True when you can use the custom title bar. This is gracefully handled by the control, but to check for this situation in your code check the value of. Turning off Aero on Windows 7, or other situations where the DWM is not used to render windows, results in title bar customization not being supported. The custom title bar support uses the genuine native Windows title bar, and relies on the DWM (Desktop Window Manager) being enabled. Note: The custom title bar is supported on Windows 7 and later.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |