TXlsFile.AddCheckbox Method
Adds a checkbox to the active sheet.
Remarks
Excel supports 2 types of checkboxes: ActiveX and internal (In Excel you would add them from the "ActiveX" and "Forms" toolbars respectively) The checkboxes added by this method are of type internal. ActiveX checkboxes are not supported.
Syntax
Unit: FlexCel.XlsAdapter
function TXlsFile.AddCheckbox(const anchor: TClientAnchor; const text: TRichString; const value: TCheckboxState; const linkedCell: TCellAddress; const name: string): Integer; overload; override;
Parameters
<-> | Parameter | Type | Description |
---|---|---|---|
const | anchor | TClientAnchor | Position for the checkbox. |
const | text | TRichString | Text for the checkbox. |
const | value | TCheckboxState | Value of the checkbox. |
const | linkedCell | TCellAddress | Cell that will be linked to the checkbox. If you don't want to link the checkbox to a cell, make this parameter null. |
const | name | string | Name that will be given to the checkbox. |
Returns
Object Index of the inserted checkbox (1 based).