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

If True, global cell padding adjustments are applied both to in-place cell editors in container controls and standalone editors. If False, global cell padding adjustments affect only in-place cell 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.

Example

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

Standalone Editors without Paddings

The following code example adds 5 pixels to left and right paddings and 2 pixels to top and bottom paddings:

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.

The UsePaddingForStandaloneEditors property’s default value is False.

See Also