Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

How to Change the Height of the Ribbon Form's Title in Code

The following example demonstrates how to change the Ribbon Form title bar’s height programmatically:

Delphi
// ...
uses
// ...
  dxRibbonForm;
// ...
  TRibbonDemoMainForm = class(TdxRibbonForm)
  public
    function GetCaptionHeightDelta(AHasQuickAccessToolbar: Boolean): Integer; override;
// ...
implementation
// ...
function TRibbonDemoMainForm.GetCaptionHeightDelta(
  AHasQuickAccessToolbar: Boolean): Integer;
begin
  Result := 0;
// Indicate that the Ribbon Form's title bar must be 2 pixels shorter if the Ribbon Quick Access Toolbar is located above the Ribbon
  if AHasQuickAccessToolbar then
    Result := -2;
end;
See Also