Class SelectedReportComponents
Holds the list of ReportComponentBase objects currently selected in the designer.
Inheritance
Namespace: FastReport
Assembly: FastReport.dll
Syntax
public class SelectedReportComponents
Remarks
This class is used by the "Border and Fill" toolbar. Use methods of this class to perform some operations on the selected objects.
Note: after calling any method in this class, call the Designer.SetModified method to reflect changes.
Note: this list contains only objects of ReportComponentBase type. If you want to access all selected objects, use the SelectedObjects property.
Properties
BorderEnabled
Gets a value indicating whether the border operations are enabled.
Declaration
public bool BorderEnabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Count
Gets the number of selected objects.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Enabled
Gets a value indicating whether the operations are enabled.
Declaration
public bool Enabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
FillEnabled
Gets a value indicating whether the fill operations are enabled.
Declaration
public bool FillEnabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
First
Gets the first selected object.
Declaration
public ReportComponentBase First { get; }
Property Value
Type | Description |
---|---|
ReportComponentBase |
SimpleBorder
Gets a value indicating whether the object with simple border is selected.
Declaration
public bool SimpleBorder { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
When the object has a simple border, you cannot change individual border lines. Example of such an object is the "Shape" and "Line" objects.
Methods
InvokeBorderEditor()
Invokes the border editor for the selected objects.
Declaration
public bool InvokeBorderEditor()
Returns
Type | Description |
---|---|
System.Boolean | true if editor was closed by the OK button. |
InvokeFillEditor()
Invokes the fill editor for the selected objects.
Declaration
public bool InvokeFillEditor()
Returns
Type | Description |
---|---|
System.Boolean | true if editor was closed by the OK button. |
InvokeHyperlinkEditor()
Invokes the hyperlink editor for the selected objects.
Declaration
public bool InvokeHyperlinkEditor()
Returns
Type | Description |
---|---|
System.Boolean | true if editor was closed by the OK button. |
SetBorder(Border)
Sets the border for the selected objects.
Declaration
public void SetBorder(Border border)
Parameters
Type | Name | Description |
---|---|---|
Border | border | Border. |
SetCanGrow(Boolean)
Sets the CanGrow flag for the selected objects.
Declaration
public void SetCanGrow(bool value)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | value | Flag value. |
SetCanShrink(Boolean)
Sets the CanShrink flag for the selected objects.
Declaration
public void SetCanShrink(bool value)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | value | Flag value. |
SetColor(Color)
Sets the solid fill color for the selected objects.
Declaration
public void SetColor(Color color)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Color | color | Fill color. |
SetFill(FillBase)
Sets the fill for the selected objects.
Declaration
public void SetFill(FillBase fill)
Parameters
Type | Name | Description |
---|---|---|
FillBase | fill | Fill. |
SetGrowToBottom(Boolean)
Sets the GrowToBottom flag for the selected objects.
Declaration
public void SetGrowToBottom(bool value)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | value | Flag value. |
SetHyperlink(Hyperlink, Boolean, Boolean)
Sets the hyperlink for the selected objects.
Declaration
public void SetHyperlink(Hyperlink hyperlink, bool modifyAppearance, bool setModified)
Parameters
Type | Name | Description |
---|---|---|
Hyperlink | hyperlink | Hyperlink. |
System.Boolean | modifyAppearance | Indicates whether to modify the object's appearance. |
System.Boolean | setModified | Indicates whether it is necessary to change designer's modified state. |
SetLineColor(Color)
Sets the border color for the selected objects.
Declaration
public void SetLineColor(Color color)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Color | color | Border color. |
SetLineStyle(LineStyle)
Sets the border style for the selected objects.
Declaration
public void SetLineStyle(LineStyle style)
Parameters
Type | Name | Description |
---|---|---|
LineStyle | style | Border style. |
SetStyle(String)
Sets the style for the selected objects.
Declaration
public void SetStyle(string style)
Parameters
Type | Name | Description |
---|---|---|
System.String | style | Style name. |
SetWidth(Single)
Sets the border width for the selected objects.
Declaration
public void SetWidth(float width)
Parameters
Type | Name | Description |
---|---|---|
System.Single | width | Border width. |
ToggleLine(BorderLines, Boolean)
Toggles the specified border line for the selected objects.
Declaration
public void ToggleLine(BorderLines line, bool toggle)
Parameters
Type | Name | Description |
---|---|---|
BorderLines | line | Border line. |
System.Boolean | toggle | Toggle value. |