ITabRange.ClearPart

Syntax

ClearPart(Part: TabCleanPart);

Parameters

Part. Elements of the cell range to be cleared. Elements in the list are separated with the logical operator Or.

Description

The ClearPart method clears the selected elements of the cell range.

Comments

The method use is relevant if the ITabCellStyle.Locked property is set to a default value, and cell editing lock is disabled.

Example

Executing the example requires a form and the following components on it: the Button component named Button1, the TabSheetBox component named TabSheetBox1, and the UiTabSheet component named UiTabSheet1. Specify UiTabSheet1 as a data source for the TabSheetBox1 component.

Add links to the ExtCtrls, Forms, and Tab system assemblies.

This example is a handler of the OnClick event for the Button1 component.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    TView: ITabView;
    TRange: ITabRange;
Begin
    TView := UiTabSheet1.TabSheet.View;
    TRange := TView.Selection.Range;
    TRange.ClearPart(TabCleanPart.Value Or TabCleanPart.Colors);
End Sub Button1OnClick;

After clicking the button, cell values and background color formatting are cleared for the selected cell range.

See also:

ITabRange