ClearPart(Part: TabCleanPart);
ClearPart(Part: Prognoz.Platform.Interop.Tab.TabCleanPart);
Part. Elements of the cell range to be cleared. Elements in the list are separated with the logical operator Or.
The ClearPart method clears specified elements of the cell range. Range elements are passed as the Part input parameter .
You can clear data using the ClearPart(TabCleanPart.Value ) method if the protection from value editing is disabled for the range cells. To enable protection from cell editing it is required to assign the TriState.OnOption value to the Locked property.
To execute the example a form, a button on this formed named Button1, the component TabSheetBox and the component UiTabSheet named UiTabSheet1, which is the data source for TabSheetBox are required.
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 you have executed the example and clicked the button, cells' values and background color formatting are cleared for the selected cell range.
To execute the example a form, a button named Button1 positioned on this form, the TabSheetBoxNet component, and the UiTabSheetNet component named UiTabSheetNet1 which is used as the data source for TabSheetBoxNet are required
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
TView: ITabView;
TRange: ITabRange;
Begin
TView := UiTabSheetNet1.TabSheetUi.TabSheet.View;
TRange := TView.Selection.Range;
TRange.ClearPart(TabCleanPart.tcpValue Or TabCleanPart.tcpColors);
End Sub;
After executing the example and clicking the button, cells' values and background color formatting are cleared for the selected cell range.
See also: