TdxSpreadSheetAutoFitColumnWidth Class
An action object that implements the AutoFitColumnWidth end-user command in Spreadsheet and Report Designer-based applications.
Declaration
TdxSpreadSheetAutoFitColumnWidth = class(
TdxSpreadSheetCustomEditAction
)
Remarks
This class does not introduce any new public members. Its overridden Execute function call adjusts the width of all columns that intersect the current cell selection to fit the longest cell value in each column.
The AutoFitColumnWidth command does not affect a column if:
- The column is empty.
- The column and its longest cell value already have the same width.
UI elements linked to a TdxSpreadSheetAutoFitColumnWidth
action object are enabled only if the following conditions are met:
- Spreadsheet document edit operations are allowed (that is, the control’s OptionsBehavior.Editing property is set to
True
). - An in-place cell editor is inactive (the active worksheet‘s IsEditing property returns
False
). - At least one cell is selected (the command is unavailable if a floating container is selected or the protected worksheet’s OptionsProtection.ActualAllowSelectUnlockedCells property returns
False
). - Column resize operations are allowed (the active worksheet’s OptionsProtection.ActualAllowResizeColumns property returns
True
).
Inheritance
See Also