Class ParentControl
Base class for controls that may contain child controls.
Inheritance
Inherited Members
Namespace: FastReport.Dialog
Assembly: FastReport.dll
Syntax
public class ParentControl : DialogControl, IComponent, IDisposable, IFRSerializable, IHasEditor, IParent
Constructors
ParentControl()
Initializes a new instance of the ParentControl class with default settings.
Declaration
public ParentControl()
Properties
Controls
Gets the collection of child controls.
Declaration
[Browsable(false)]
public DialogComponentCollection Controls { get; }
Property Value
Type | Description |
---|---|
DialogComponentCollection |
Methods
AddChild(Base)
Adds a child object to this object's childs.
Declaration
public virtual void AddChild(Base child)
Parameters
Type | Name | Description |
---|---|---|
Base | child | Object to add. |
CanContain(Base)
Gets a value indicating that this object can contain the specified child object.
Declaration
public virtual bool CanContain(Base child)
Parameters
Type | Name | Description |
---|---|---|
Base | child | Child object. |
Returns
Type | Description |
---|---|
System.Boolean | true if this object can contain the specified child object; otherwise, false. |
DrawSelection(FRPaintEventArgs)
Draw the selection points.
Declaration
public override void DrawSelection(FRPaintEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
FRPaintEventArgs | e | Paint event args. |
Overrides
Remarks
This method draws a set of selection points returned by the FastReport.ComponentBase.GetSelectionPoints() method.
GetChildObjects(ObjectCollection)
Gets a list of child objects.
Declaration
public virtual void GetChildObjects(ObjectCollection list)
Parameters
Type | Name | Description |
---|---|---|
ObjectCollection | list | List to fill with values. |
GetChildOrder(Base)
Returns z-order of the specified child object.
Declaration
public virtual int GetChildOrder(Base child)
Parameters
Type | Name | Description |
---|---|---|
Base | child | Child object. |
Returns
Type | Description |
---|---|
System.Int32 | Z-order of the specified object. |
Remarks
This method must return the index of a specified child object in the internal child list.
GetPreferredSize()
Gets the preferred size of an object.
Declaration
public override SizeF GetPreferredSize()
Returns
Type | Description |
---|---|
System.Drawing.SizeF | Preferred size. |
Overrides
Remarks
This method is called by the FastReport designer when you insert a new object.
HandleMouseDown(FRMouseEventArgs)
Handles MouseDown event that occurs when the user clicks the mouse in the designer.
Declaration
public override void HandleMouseDown(FRMouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
FRMouseEventArgs | e | Current mouse state. |
Overrides
Remarks
This method is called when the user press the mouse button in the designer. The standard implementation does the following:
- checks if the mouse pointer is inside the object;
- add an object to the selected objects list of the designer;
- sets the e.Handled flag to true.
HandleMouseHover(FRMouseEventArgs)
Handles MouseMove event that occurs when the user moves the mouse in the designer.
Declaration
public override void HandleMouseHover(FRMouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
FRMouseEventArgs | e | Current mouse state. |
Overrides
Remarks
This method is called when the user moves the mouse in the designer. Typical use of this method is to change the mouse cursor to SizeAll when it is over an object. The standard implementation does the following:
- checks if the mouse pointer is inside the object;
- changes the cursor shape (e.Cursor property);
- sets the e.Handled flag to true.
HandleMouseUp(FRMouseEventArgs)
Handles MouseUp event that occurs when the user releases the mouse button in the designer.
Declaration
public override void HandleMouseUp(FRMouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
FRMouseEventArgs | e | Current mouse state. |
Overrides
Remarks
This method is called when the user releases the mouse button in the designer. The standard implementation does the following:
- if e.Mode is WorkspaceMode2.SelectionRect, checks if object is inside the selection rectangle and sets e.Handled flag if so;
- checks that object is inside its parent (calls the FastReport.ComponentBase.CheckParent(System.Boolean) method).
RemoveChild(Base)
Removes a specified object from this object's childs.
Declaration
public virtual void RemoveChild(Base child)
Parameters
Type | Name | Description |
---|---|---|
Base | child |
SetChildOrder(Base, Int32)
Sets the z-order of the specified object.
Declaration
public virtual void SetChildOrder(Base child, int order)
Parameters
Type | Name | Description |
---|---|---|
Base | child | Child object. |
System.Int32 | order | New Z-order. |
Remarks
This method must place the specified child object at the specified position in the internal child list.
UpdateLayout(Single, Single)
Updates the children layout when the size of this object is changed by dx, dy values.
Declaration
public virtual void UpdateLayout(float dx, float dy)
Parameters
Type | Name | Description |
---|---|---|
System.Single | dx | X delta. |
System.Single | dy | Y delta. |
Remarks
This method must update positions/sizes of child objects whose Dock or Anchor properties are set to non-default values.