Skip to main content

TdxVisualRefinements.UsePaddingForStandaloneEditors Property

Specifies if global cell padding adjustments affect standalone DevExpress editors.

Declaration

class property UsePaddingForStandaloneEditors: Boolean read; write;

Property Value

Type Description
Boolean
False
Default. Global cell padding adjustments affect only in-place cell editors.
True
Global cell padding adjustments are applied both to in-place cell editors in container controls and standalone editors.

Remarks

Set the UsePaddingForStandaloneEditors property to True in the initialization section of the main application unit to apply cell padding adjustments to standalone editors.

Code Example: Adjust Paddings for Standalone Editors

The Padding property affects in-place cell editors when the UsePaddingForStandaloneEditors property is set to False.

Standalone Editors without Paddings

The code example in this section adds 5 pixels to left and right paddings and 2 pixels to top and bottom paddings.

Open the Project Source to Edit the Main Function

To open the main application unit of your project, you can use one of the following options:

  • Select ProjectView Source in the main menu of your RAD Studio IDE.
  • Select the target project in the Projects Window and press Ctrl + V (alternatively, you can display the context menu and select the View Source option).
uses
  Forms,
  cxLookAndFeels, // Adds the cxLookAndFeels unit to use the TdxVisualRefinements class
// ...
begin
  TdxVisualRefinements.BeginUpdate;  // Initiates the following batch change
  try
    TdxVisualRefinements.Padding := Rect(5, 2, 5, 2);
    TdxVisualRefinements.UsePaddingForStandaloneEditors := True;
  finally
    TdxVisualRefinements.EndUpdate;  // Calls EndUpdate regardless of the batch operation's success
  end;
  Application.Initialize;
  Application.MainFormOnTaskbar := True;
  Application.CreateForm(TMyForm, MyForm);
  Application.Run;
end.

Standalone Editors with Paddings Applied

Note

You can pass True as a parameter to the ApplyLightStyle class procedure to set the UsePaddingForStandaloneEditors property to True.

Default Value

The UsePaddingForStandaloneEditors property’s default value is False.

See Also