Class ActiveXControl
Contents
[
Hide
]ActiveXControl class
Represents the ActiveX control.
public abstract class ActiveXControl : ActiveXControlBase
Properties
Name | Description |
---|---|
virtual BackOleColor { get; set; } | Gets and sets the ole color of the background.(Inherited from ActiveXControlBase .) |
override Data { get; } | Gets and sets the binary data of the control. |
Font { get; } | Represents the font of the control. |
virtual ForeOleColor { get; set; } | Gets and sets the ole color of the foreground.(Inherited from ActiveXControlBase .) |
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. |
virtual IsAutoSize { get; set; } | Indicates whether the control will automatically resize to display its entire contents. |
IsEnabled { get; set; } | Indicates whether the control can receive the focus and respond to user-generated events. |
IsLocked { get; set; } | Indicates whether data in the control is locked for editing. |
IsTransparent { get; set; } | Indicates whether the control is transparent. |
virtual IsVisible { get; set; } | Indicates whether this control is visible.(Inherited from ActiveXControlBase .) |
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 .) |
virtual Shadow { get; set; } | Indicates whether to show a shadow.(Inherited from ActiveXControlBase .) |
TextAlign { get; set; } | Represents how to align the text used by the control. |
abstract Type { get; } | Gets the type of the ActiveX control.(Inherited from ActiveXControlBase .) |
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
using System;
using Aspose.Cells;
using Aspose.Cells.Drawing;
using Aspose.Cells.Drawing.ActiveXControls;
namespace AsposeCellsExamples
{
public class ActiveXControlsClassActiveXControlDemo
{
public static void Run()
{
// Create workbook
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];
// Add RadioButton ActiveX control
Shape shape = worksheet.Shapes.AddActiveXControl(
ControlType.RadioButton,
1, 1, // upper left row/column
1, 1, // upper left row/column offsets
100, 30); // width and height
RadioButtonActiveXControl radioButton = (RadioButtonActiveXControl)shape.ActiveXControl;
// Set properties
radioButton.GroupName = "Sheet1";
radioButton.Alignment = ControlCaptionAlignmentType.Left;
radioButton.IsWordWrapped = true;
radioButton.Caption = "OptionButton1";
radioButton.PicturePosition = ControlPicturePositionType.AboveCenter;
radioButton.SpecialEffect = ControlSpecialEffectType.Sunken;
radioButton.IsEnabled = true;
radioButton.IsTransparent = false;
radioButton.IsAutoSize = false;
radioButton.IMEMode = InputMethodEditorMode.NoControl;
radioButton.Font.Name = "Calibri";
radioButton.MousePointer = ControlMousePointerType.Default;
// Save the workbook
workbook.Save("ActiveXControlDemo.xlsx");
}
}
}
See Also
- class ActiveXControlBase
- namespace Aspose.Cells.Drawing.ActiveXControls
- assembly Aspose.Cells