Class CheckBoxActiveXControl
Contents
[
Hide
]CheckBoxActiveXControl class
Represents a CheckBox ActiveX control.
public class CheckBoxActiveXControl : ActiveXControl
Properties
Name | Description |
---|---|
Accelerator { get; set; } | Gets and sets the accelerator key for the control. |
Alignment { get; set; } | Gets and set the position of the Caption relative to the control. |
virtual BackOleColor { get; set; } | Gets and sets the ole color of the background.(Inherited from ActiveXControlBase .) |
Caption { get; set; } | Gets and set the descriptive text that appears on a control. |
override Data { get; } | Gets and sets the binary data of the control.(Inherited from ActiveXControl .) |
Font { get; } | Represents the font of the control.(Inherited from ActiveXControl .) |
virtual ForeOleColor { get; set; } | Gets and sets the ole color of the foreground.(Inherited from ActiveXControlBase .) |
GroupName { get; set; } | Gets and sets the group’s name. |
virtual Height { get; set; } | Gets and sets the height of the control in unit of points.(Inherited from ActiveXControlBase .) |
IMEMode { get; set; } | Gets and sets the default run-time mode of the Input Method Editor for the control as it receives focus.(Inherited from ActiveXControl .) |
virtual IsAutoSize { get; set; } | Indicates whether the control will automatically resize to display its entire contents.(Inherited from ActiveXControl .) |
IsEnabled { get; set; } | Indicates whether the control can receive the focus and respond to user-generated events.(Inherited from ActiveXControl .) |
IsLocked { get; set; } | Indicates whether data in the control is locked for editing.(Inherited from ActiveXControl .) |
IsTransparent { get; set; } | Indicates whether the control is transparent.(Inherited from ActiveXControl .) |
IsTripleState { get; set; } | Indicates how the specified control will display Null values. |
virtual IsVisible { get; set; } | Indicates whether this control is visible.(Inherited from ActiveXControlBase .) |
IsWordWrapped { get; set; } | Indicates whether the contents of the control automatically wrap at the end of a line. |
LinkedCell { get; set; } | Gets and sets the linked cell.(Inherited from ActiveXControlBase .) |
ListFillRange { get; set; } | Gets and sets the list fill range.(Inherited from ActiveXControlBase .) |
MouseIcon { get; set; } | Gets and sets a custom icon to display as the mouse pointer for the control.(Inherited from ActiveXControlBase .) |
MousePointer { get; set; } | Gets and sets the type of icon displayed as the mouse pointer for the control.(Inherited from ActiveXControlBase .) |
Picture { get; set; } | Gets and sets the data of the picture. |
PicturePosition { get; set; } | Gets and set the location of the control’s picture relative to its caption. |
virtual Shadow { get; set; } | Indicates whether to show a shadow.(Inherited from ActiveXControlBase .) |
SpecialEffect { get; set; } | Gets and sets the special effect of the control. |
TextAlign { get; set; } | Represents how to align the text used by the control.(Inherited from ActiveXControl .) |
override Type { get; } | Gets the type of the ActiveX control. |
Value { get; set; } | Indicates if the control is checked or not. |
virtual Width { get; set; } | Gets and sets the width of the control in unit of points.(Inherited from ActiveXControlBase .) |
Workbook { get; } | Gets the Workbook object.(Inherited from ActiveXControlBase .) |
Examples
[C#]
namespace Demos
{
using Aspose.Cells;
using Aspose.Cells.Drawing;
using Aspose.Cells.Drawing.ActiveXControls;
using System;
public class CheckBoxActiveXControlDemo
{
public static void CheckBoxActiveXControlExample()
{
// Create a new workbook and access the first worksheet
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];
// Add a CheckBox ActiveX control to the worksheet
var shape = worksheet.Shapes.AddActiveXControl(ControlType.CheckBox, 5, 0, 5, 0, 100, 20);
CheckBoxActiveXControl checkBox = (CheckBoxActiveXControl)shape.ActiveXControl;
// Set properties of the CheckBox ActiveX control
checkBox.Caption = "I agree";
checkBox.IsWordWrapped = true;
checkBox.Alignment = ControlCaptionAlignmentType.Left;
checkBox.PicturePosition = ControlPicturePositionType.Center;
checkBox.SpecialEffect = ControlSpecialEffectType.Flat;
checkBox.Accelerator = 'A';
checkBox.Value = CheckValueType.Checked;
checkBox.IsTripleState = false;
checkBox.IsEnabled = true;
checkBox.IsLocked = false;
checkBox.IsTransparent = false;
checkBox.IsAutoSize = true;
checkBox.IMEMode = InputMethodEditorMode.NoControl;
checkBox.TextAlign = TextAlignmentType.Center;
checkBox.Width = 150;
checkBox.Height = 30;
checkBox.MousePointer = ControlMousePointerType.Default;
checkBox.ForeOleColor = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.Black);
checkBox.BackOleColor = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.White);
checkBox.IsVisible = true;
checkBox.Shadow = false;
checkBox.LinkedCell = "A1";
checkBox.ListFillRange = "A2:A5";
// Save the workbook
workbook.Save("CheckBoxActiveXControlExample.xlsx");
workbook.Save("CheckBoxActiveXControlExample.pdf");
}
}
}
See Also
- class ActiveXControl
- namespace Aspose.Cells.Drawing.ActiveXControls
- assembly Aspose.Cells