Class GroupShape
Contents
[
Hide
]GroupShape class
Represents the group shape which contains the individual shapes.
public class GroupShape : Shape
Properties
Name | Description |
---|---|
ActiveXControl { get; } | Gets the ActiveX control.(Inherited from Shape .) |
ActualLowerRightRow { get; } | Get the actual bottom row.(Inherited from Shape .) |
AlternativeText { get; set; } | Returns or sets the descriptive (alternative) text string of the Shape object.(Inherited from Shape .) |
AnchorType { get; set; } | Gets and set the shape anchor placeholder.(Inherited from Shape .) |
AutoShapeType { get; set; } | Gets and sets the auto shape type.(Inherited from Shape .) |
Bottom { get; set; } | Represents the width of the shape’s vertical offset from its lower bottom corner row, in unit of pixels.(Inherited from Shape .) |
ConnectionPoints { get; } | (Obsolete.) Get the connection points(Inherited from Shape .) |
ControlData { get; } | Gets the data of control.(Inherited from Shape .) |
CreateId { get; set; } | Gets and sets create id for this shape.(Inherited from Shape .) |
Fill { get; } | Returns a FillFormat object that contains fill formatting properties for the specified shape.(Inherited from Shape .) |
FillFormat { get; } | (Obsolete.) Returns a MsoFillFormat object that contains fill formatting properties for the specified shape.(Inherited from Shape .) |
Font { get; set; } | Represents the font of shape.(Inherited from Shape .) |
FormatPicture { get; } | Gets and sets the options of the picture format.(Inherited from Shape .) |
Geometry { get; } | Gets the geometry(Inherited from Shape .) |
Glow { get; } | Represents a GlowEffect object that specifies glow effect for the chart element or shape.(Inherited from Shape .) |
Group { get; } | Gets the group shape which contains this shape.(Inherited from Shape .) |
HasLine { get; set; } | Gets and sets the line border of the shape is visible.(Inherited from Shape .) |
Height { get; set; } | Represents the height of shape, in unit of pixel.(Inherited from Shape .) |
HeightCM { get; set; } | Represents the height of the shape, in unit of centimeters.(Inherited from Shape .) |
HeightInch { get; set; } | Represents the height of the shape, in unit of inches.(Inherited from Shape .) |
HeightInShape { get; set; } | Represents the vertical offset of shape from the top border of the parent shape, in unit of 1/4000 of height of the parent shape..(Inherited from Shape .) |
HeightPt { get; set; } | Represents the height of the shape, in unit of points.(Inherited from Shape .) |
HeightScale { get; set; } | Gets and sets the height scale,in unit of percent of the original picture height. If the shape is not picture ,the HeightScale property only returns 100;(Inherited from Shape .) |
HtmlText { get; set; } | Gets and sets the html string which contains data and some formats in this textbox.(Inherited from Shape .) |
Hyperlink { get; } | Gets the hyperlink of the shape.(Inherited from Shape .) |
Id { get; } | Gets the identifier of this shape.(Inherited from Shape .) |
InputRange { get; set; } | Gets or sets the worksheet range used to fill the specified combo box.(Inherited from Shape .) |
IsEquation { get; } | Indicates whether the shape only contains an equation.(Inherited from Shape .) |
IsFilled { get; set; } | Indicates whether the fill format is visible.(Inherited from Shape .) |
IsFlippedHorizontally { get; set; } | Gets and sets whether shape is horizontally flipped .(Inherited from Shape .) |
IsFlippedVertically { get; set; } | Gets and sets whether shape is vertically flipped .(Inherited from Shape .) |
IsGroup { get; } | Indicates whether the shape is a group.(Inherited from Shape .) |
IsHidden { get; set; } | Indicates whether the object is visible.(Inherited from Shape .) |
IsInGroup { get; } | Indicates whether the shape is grouped.(Inherited from Shape .) |
IsLockAspectRatio { get; set; } | True means that don’t allow changes in aspect ratio.(Inherited from Shape .) |
IsLocked { get; set; } | True if the object is locked, False if the object can be modified when the sheet is protected.(Inherited from Shape .) |
IsPrintable { get; set; } | True if the object is printable(Inherited from Shape .) |
IsRichText { get; } | Whether or not the text is rich text.(Inherited from Shape .) |
IsSmartArt { get; } | Indicates whether the shape is smart art.(Inherited from Shape .) |
IsTextWrapped { get; set; } | Gets and sets the text wrapped type of the shape which contains text.(Inherited from Shape .) |
IsWordArt { get; } | Indicates whether this shape is a word art.(Inherited from Shape .) |
Item { get; } | Gets the child shape by index. |
Left { get; set; } | Represents the horizontal offset of shape from its left column, in unit of pixels.(Inherited from Shape .) |
LeftCM { get; set; } | Represents the horizontal offset of shape from its left column, in unit of centimeters.(Inherited from Shape .) |
LeftInch { get; set; } | Represents the horizontal offset of shape from its left column, in unit of inches.(Inherited from Shape .) |
LeftInShape { get; set; } | Represents the horizontal offset of shape from the left border of the parent shape, in unit of 1/4000 of width of the parent shape.(Inherited from Shape .) |
LeftToCorner { get; set; } | Gets and sets the horizonal offset of shape from worksheet left border.(Inherited from Shape .) |
Line { get; } | Gets line style(Inherited from Shape .) |
LineFormat { get; } | (Obsolete.) Returns a MsoLineFormat object that contains line formatting properties for the specified shape.(Inherited from Shape .) |
LinkedCell { get; set; } | Gets or sets the worksheet range linked to the control’s value.(Inherited from Shape .) |
LowerDeltaX { get; set; } | Gets or sets the shape’s horizontal offset from its lower right corner column.(Inherited from Shape .) |
LowerDeltaY { get; set; } | Gets or sets the shape’s vertical offset from its lower right corner row.(Inherited from Shape .) |
LowerRightColumn { get; set; } | Represents lower right corner column index.(Inherited from Shape .) |
LowerRightRow { get; set; } | Represents lower right corner row index.(Inherited from Shape .) |
MacroName { get; set; } | Gets and sets the name of macro.(Inherited from Shape .) |
MsoDrawingType { get; } | Gets mso drawing type.(Inherited from Shape .) |
Name { get; set; } | Gets and sets the name of the shape.(Inherited from Shape .) |
Paths { get; } | Gets the paths of a custom geometric shape.(Inherited from Shape .) |
Placement { get; set; } | Represents the way the drawing object is attached to the cells below it. The property controls the placement of an object on a worksheet.(Inherited from Shape .) |
Reflection { get; } | Represents a ReflectionEffect object that specifies reflection effect for the chart element or shape.(Inherited from Shape .) |
RelativeToOriginalPictureSize { get; set; } | Indicates whether shape is relative to original picture size.(Inherited from Shape .) |
Right { get; set; } | Represents the width of the shape’s horizontal offset from its lower right corner column, in unit of pixels.(Inherited from Shape .) |
RotationAngle { get; set; } | Gets and sets the rotation of the shape.(Inherited from Shape .) |
ShadowEffect { get; } | Represents a ShadowEffect object that specifies shadow effect for the chart element or shape.(Inherited from Shape .) |
SoftEdges { get; set; } | Gets and sets the radius of blur to apply to the edges, in unit of points.(Inherited from Shape .) |
Spid { get; } | Specifies an optional string that an application can use to Identify the particular shape.(Inherited from Shape .) |
Spt { get; } | Specifies an optional number that an application can use to associate the particular shape with a defined shape type.(Inherited from Shape .) |
Text { get; set; } | Represents the string in this TextBox object.(Inherited from Shape .) |
TextBody { get; } | Gets and sets the setting of the shape’s text.(Inherited from Shape .) |
TextDirection { get; set; } | Gets/Sets the direction of the text flow for this object.(Inherited from Shape .) |
TextEffect { get; } | Returns a TextEffectFormat object that contains text-effect formatting properties for the specified shape. Applies to Shape objects that represent WordArt.(Inherited from Shape .) |
TextFrame { get; } | (Obsolete.) Returns a TextFrame object that contains the alignment and anchoring properties for the specified shape.(Inherited from Shape .) |
TextHorizontalAlignment { get; set; } | Gets and sets the text horizontal alignment type of the shape.(Inherited from Shape .) |
TextHorizontalOverflow { get; set; } | Gets and sets the text horizontal overflow type of the shape which contains text.(Inherited from Shape .) |
TextOptions { get; set; } | Represents the text options of the shape.(Inherited from Shape .) |
TextOrientationType { get; set; } | Gets and sets the text orientation type of the shape.(Inherited from Shape .) |
TextShapeType { get; set; } | Gets and sets the preset text shape type.(Inherited from Shape .) |
TextVerticalAlignment { get; set; } | Gets and sets the text vertical alignment type of the shape.(Inherited from Shape .) |
TextVerticalOverflow { get; set; } | Gets and sets the text vertical overflow type of the shape which contains text.(Inherited from Shape .) |
ThreeDFormat { get; } | Gets and sets 3d format of the shape.(Inherited from Shape .) |
Title { get; set; } | Specifies the title (caption) of the current shape object.(Inherited from Shape .) |
Top { get; set; } | Represents the vertical offset of shape from its top row, in unit of pixels.(Inherited from Shape .) |
TopCM { get; set; } | Represents the vertical offset of shape from its top row, in unit of centimeters.(Inherited from Shape .) |
TopInch { get; set; } | Represents the vertical offset of shape from its top row, in unit of inches.(Inherited from Shape .) |
TopInShape { get; set; } | Represents the vertical offset of shape from the top border of the parent shape, in unit of 1/4000 of height of the parent shape.(Inherited from Shape .) |
TopToCorner { get; set; } | Gets and sets the vertical offset of shape from worksheet top border, in unit of pixels.(Inherited from Shape .) |
Type { get; } | Gets the auto shape type.(Inherited from Shape .) |
UpperDeltaX { get; set; } | Gets or sets the shape’s horizontal offset from its upper left corner column.(Inherited from Shape .) |
UpperDeltaY { get; set; } | Gets or sets the shape’s vertical offset from its upper left corner row.(Inherited from Shape .) |
UpperLeftColumn { get; set; } | Represents upper left corner column index.(Inherited from Shape .) |
UpperLeftRow { get; set; } | Represents upper left corner row index.(Inherited from Shape .) |
Width { get; set; } | Represents the width of shape, in unit of pixels.(Inherited from Shape .) |
WidthCM { get; set; } | Represents the width of the shape, in unit of centimeters.(Inherited from Shape .) |
WidthInch { get; set; } | Represents the width of the shape, in unit of inch.(Inherited from Shape .) |
WidthInShape { get; set; } | Represents the width of the shape, in unit of 1/4000 of the parent shape.(Inherited from Shape .) |
WidthPt { get; set; } | Represents the width of the shape, in unit of point.(Inherited from Shape .) |
WidthScale { get; set; } | Gets and sets the width scale, in unit of percent of the original picture width. If the shape is not picture ,the WidthScale property only returns 100;(Inherited from Shape .) |
Worksheet { get; } | Gets the Worksheet object which contains this shape.(Inherited from Shape .) |
X { get; set; } | Gets and sets the horizontal offset of shape from worksheet left border,in unit of pixels.(Inherited from Shape .) |
Y { get; set; } | Gets and sets the vertical offset of shape from worksheet top border,in unit of pixels.(Inherited from Shape .) |
ZOrderPosition { get; set; } | Returns the position of a shape in the z-order.(Inherited from Shape .) |
Methods
Name | Description |
---|---|
AddHyperlink(string) | Adds a hyperlink to the shape.(Inherited from Shape .) |
AlignTopRightCorner(int, int) | Moves the picture to the top-right corner.(Inherited from Shape .) |
CalculateTextSize() | Recalculate the text area(Inherited from Shape .) |
Characters(int, int) | Returns a Characters object that represents a range of characters within the text.(Inherited from Shape .) |
FormatCharacters(int, int, Font) | (Obsolete.) Formats some characters with the font setting.(Inherited from Shape .) |
FormatCharacters(int, int, Font, StyleFlag) | Formats some characters with the font setting.(Inherited from Shape .) |
GetActualBox() | Get the actual position and size of the shape (after applying rotation, flip, etc.)(Inherited from Shape .) |
GetCharacters() | (Obsolete.) Returns all Characters objects that represents a range of characters within the text .(Inherited from Shape .) |
GetConnectionPoints() | Get the connection points(Inherited from Shape .) |
GetGroupedShapes() | Gets the shapes grouped by this shape. |
GetInputRange(bool, bool) | Gets the range used to fill the control.(Inherited from Shape .) |
GetLinkedCell(bool, bool) | Gets the range linked to the control’s value.(Inherited from Shape .) |
GetLockedProperty(ShapeLockType) | Gets the value of locked property.(Inherited from Shape .) |
virtual GetResultOfSmartArt() | Converting smart art to grouped shapes.(Inherited from Shape .) |
GetRichFormattings() | Returns all Characters objects that represents a range of characters within the text .(Inherited from Shape .) |
virtual IsSameSetting(object) | Returns whether the shape is same.(Inherited from Shape .) |
MoveToRange(int, int, int, int) | Moves the shape to a specified range.(Inherited from Shape .) |
RemoveActiveXControl() | Remove activeX control.(Inherited from Shape .) |
RemoveHyperlink() | Remove the hyperlink of the shape.(Inherited from Shape .) |
SetInputRange(string, bool, bool) | Sets the range used to fill the control.(Inherited from Shape .) |
SetLinkedCell(string, bool, bool) | Sets the range linked to the control’s value.(Inherited from Shape .) |
SetLockedProperty(ShapeLockType, bool) | Set the locked property.(Inherited from Shape .) |
ToFrontOrBack(int) | Brings the shape to the front or sends the shape to back.(Inherited from Shape .) |
ToImage(ImageOrPrintOptions) | Returns the bitmap object of the shape .(Inherited from Shape .) |
ToImage(Stream, ImageFormat) | (Obsolete.) Creates the shape image and saves it to a stream in the specified format.(Inherited from Shape .) |
ToImage(Stream, ImageOrPrintOptions) | Saves the shape to a stream.(Inherited from Shape .) |
ToImage(Stream, ImageType) | Creates the shape image and saves it to a stream in the specified format.(Inherited from Shape .) |
ToImage(string, ImageOrPrintOptions) | Saves the shape to a file.(Inherited from Shape .) |
Ungroup() | Ungroups the shape items. |
UpdateSelectedValue() | Update the selected value by the value of the linked cell.(Inherited from Shape .) |
Examples
[C#]
//Instantiate a new Workbook.
Workbook excelbook = new Workbook();
//Add a group box to the first worksheet.
GroupBox box = excelbook.Worksheets[0].Shapes.AddGroupBox(1, 0, 1, 0, 300, 250);
//Set the caption of the group box.
box.Text = "Age Groups";
box.Placement = PlacementType.FreeFloating;
//Make it 2-D box.
box.Shadow = false;
//Add a radio button.
RadioButton radio1 = excelbook.Worksheets[0].Shapes.AddRadioButton(3, 0, 2, 0, 30, 110);
//Set its text string.
radio1.Text = "20-29";
//Set A1 cell as a linked cell for the radio button.
radio1.LinkedCell = "A1";
//Make the radio button 3-D.
radio1.Shadow = true;
//Set the foreground color of the radio button.
radio1.FillFormat.ForeColor = Color.LightGreen;
//Set the line style of the radio button.
radio1.LineFormat.Style = MsoLineStyle.ThickThin;
//Set the weight of the radio button.
radio1.LineFormat.Weight = 4;
//Set the line color of the radio button.
radio1.LineFormat.ForeColor = Color.Blue;
//Set the dash style of the radio button.
radio1.LineFormat.DashStyle = MsoLineDashStyle.Solid;
//Make the line format visible.
radio1.LineFormat.IsVisible = true;
//Make the fill format visible.
radio1.FillFormat.IsVisible = true;
//Add another radio button.
RadioButton radio2 = excelbook.Worksheets[0].Shapes.AddRadioButton(6, 0, 2, 0, 30, 110);
//Set its text string.
radio2.Text = "30-39";
//Set A1 cell as a linked cell for the radio button.
radio2.LinkedCell = "A1";
//Make the radio button 3-D.
radio2.Shadow = true;
//Set the foreground color of the radio button.
radio2.FillFormat.ForeColor = Color.LightGreen;
//Set the line style of the radio button.
radio2.LineFormat.Style = MsoLineStyle.ThickThin;
//Set the weight of the radio button.
radio2.LineFormat.Weight = 4;
//Set the line color of the radio button.
radio2.LineFormat.ForeColor = Color.Blue;
//Set the dash style of the radio button.
radio2.LineFormat.DashStyle = MsoLineDashStyle.Solid;
//Make the line format visible.
radio2.LineFormat.IsVisible = true;
//Make the fill format visible.
radio2.FillFormat.IsVisible = true;
//Add another radio button.
RadioButton radio3 = excelbook.Worksheets[0].Shapes.AddRadioButton(9, 0, 2, 0, 30, 110);
//Set its text string.
radio3.Text = "40-49";
//Set A1 cell as a linked cell for the radio button.
radio3.LinkedCell = "A1";
//Make the radio button 3-D.
radio3.Shadow = true;
//Set the foreground color of the radio button.
radio3.FillFormat.ForeColor = Color.LightGreen;
//Set the line style of the radio button.
radio3.LineFormat.Style = MsoLineStyle.ThickThin;
//Set the weight of the radio button.
radio3.LineFormat.Weight = 4;
//Set the line color of the radio button.
radio3.LineFormat.ForeColor = Color.Blue;
//Set the dash style of the radio button.
radio3.LineFormat.DashStyle = MsoLineDashStyle.Solid;
//Make the line format visible.
radio3.LineFormat.IsVisible = true;
//Make the fill format visible.
radio3.FillFormat.IsVisible = true;
//Get the shapes.
Shape[] shapeobjects = new Shape[] { box, radio1, radio2, radio3 };
//Group the shapes.
GroupShape group = excelbook.Worksheets[0].Shapes.Group(shapeobjects);
//Save the excel file.
excelbook.Save("groupshapes.xls");
[VB.NET]
'Instantiate a new Workbook.
Dim excelbook As Workbook = New Workbook()
'Add a group box to the first worksheet.
Dim box As GroupBox = excelbook.Worksheets(0).Shapes.AddGroupBox(1, 0, 1, 0, 300, 250)
'Set the caption of the group box.
box.Text = "Age Groups"
box.Placement = PlacementType.FreeFloating
'Make it 2-D box.
box.Shadow = False
'Add a radio button.
Dim radio1 As RadioButton = excelbook.Worksheets(0).Shapes.AddRadioButton(3, 0, 2, 0, 30, 110)
'Set its text string.
radio1.Text = "20-29"
'Set A1 cell as a linked cell for the radio button.
radio1.LinkedCell = "A1"
'Make the radio button 3-D.
radio1.Shadow = True
'Set the foreground color of the radio button.
radio1.FillFormat.ForeColor = Color.LightGreen
'Set the line style of the radio button.
radio1.LineFormat.Style = MsoLineStyle.ThickThin
'Set the weight of the radio button.
radio1.LineFormat.Weight = 4
'Set the line color of the radio button.
radio1.LineFormat.ForeColor = Color.Blue
'Set the dash style of the radio button.
radio1.LineFormat.DashStyle = MsoLineDashStyle.Solid
'Make the line format visible.
radio1.LineFormat.IsVisible = True
'Make the fill format visible.
radio1.FillFormat.IsVisible = True
'Add another radio button.
Dim radio2 As RadioButton = excelbook.Worksheets(0).Shapes.AddRadioButton(6, 0, 2, 0, 30, 110)
'Set its text string.
radio2.Text = "30-39"
'Set A1 cell as a linked cell for the radio button.
radio2.LinkedCell = "A1"
'Make the radio button 3-D.
radio2.Shadow = True
'Set the foreground color of the radio button.
radio2.FillFormat.ForeColor = Color.LightGreen
'Set the line style of the radio button.
radio2.LineFormat.Style = MsoLineStyle.ThickThin
'Set the weight of the radio button.
radio2.LineFormat.Weight = 4
'Set the line color of the radio button.
radio2.LineFormat.ForeColor = Color.Blue
'Set the dash style of the radio button.
radio2.LineFormat.DashStyle = MsoLineDashStyle.Solid
'Make the line format visible.
radio2.LineFormat.IsVisible = True
'Make the fill format visible.
radio2.FillFormat.IsVisible = True
'Add another radio button.
Dim radio3 As RadioButton = excelbook.Worksheets(0).Shapes.AddRadioButton(9, 0, 2, 0, 30, 110)
'Set its text string.
radio3.Text = "40-49"
'Set A1 cell as a linked cell for the radio button.
radio3.LinkedCell = "A1"
'Make the radio button 3-D.
radio3.Shadow = True
'Set the foreground color of the radio button.
radio3.FillFormat.ForeColor = Color.LightGreen
'Set the line style of the radio button.
radio3.LineFormat.Style = MsoLineStyle.ThickThin
'Set the weight of the radio button.
radio3.LineFormat.Weight = 4
'Set the line color of the radio button.
radio3.LineFormat.ForeColor = Color.Blue
'Set the dash style of the radio button.
radio3.LineFormat.DashStyle = MsoLineDashStyle.Solid
'Make the line format visible.
radio3.LineFormat.IsVisible = True
'Make the fill format visible.
radio3.FillFormat.IsVisible = True
'Get the shapes.
Dim shapeobjects() As Shape = New Shape() {box, radio1, radio2, radio3}
'Group the shapes.
Dim group As GroupShape = excelbook.Worksheets(0).Shapes.Group(shapeobjects)
'Save the excel file.
excelbook.Save("groupshapes.xls")
See Also
- class Shape
- namespace Aspose.Cells.Drawing
- assembly Aspose.Cells