Search Results for

    Show / Hide Table of Contents

    Class DialogPage

    Represents the special kind of report page that wraps the System.Windows.Forms.Form and used to display dialog forms.

    Inheritance
    System.Object
    Base
    ComponentBase
    PageBase
    DialogPage
    Implements
    IFRSerializable
    IParent
    Inherited Members
    PageBase.Refresh()
    PageBase.Modify()
    ComponentBase.AbsBottom
    ComponentBase.AbsBounds
    ComponentBase.AbsLeft
    ComponentBase.AbsRight
    ComponentBase.AbsTop
    ComponentBase.Anchor
    ComponentBase.Bottom
    ComponentBase.Bounds
    ComponentBase.Dock
    ComponentBase.GroupIndex
    ComponentBase.Left
    ComponentBase.Right
    ComponentBase.Tag
    ComponentBase.Top
    ComponentBase.Visible
    ComponentBase.VisibleExpression
    ComponentBase.Printable
    ComponentBase.PrintableExpression
    ComponentBase.GetExpressions()
    ComponentBase.CalcVisibleExpression(String)
    ComponentBase.Draw(FRPaintEventArgs)
    Base.Name
    Base.Restrictions
    Base.Flags
    Base.Parent
    Base.BaseName
    Base.ClassName
    Base.Report
    Base.Page
    Base.ChildObjects
    Base.AllObjects
    Base.ZOrder
    Base.IsAncestor
    Base.IsDesigning
    Base.IsPrinting
    Base.IsRunning
    Base.OriginalComponent
    Base.Disposed
    Base.SetProp(Base, Base)
    Base.FloatDiff(Single, Single)
    Base.DeserializeSubItems(FRReader)
    Base.ExtractDefaultMacros(String)
    Base.Dispose()
    Base.SetFlags(Flags, Boolean)
    Base.SetReport(Report)
    Base.SetName(String)
    Base.SetParent(Base)
    Base.SetParentCore(Base)
    Base.FindObject(String)
    Base.CreateUniqueName()
    Base.Clear()
    Base.BaseAssign(Base)
    Base.AssignAll(Base)
    Base.HasParent(Base)
    Base.HasFlag(Flags)
    Base.HasRestriction(Restrictions)
    Base.InvokeEvent(String, Object)
    Base.OnAfterLoad()
    Base.GetCustomScript()
    Base.ExtractMacros()
    Base.IsHaveToConvert(Object)
    Base.GetConvertedObjects()
    Base.ForEachAllConvectedObjects(Object)
    Namespace: FastReport.Dialog
    Assembly: FastReport.dll
    Syntax
    public class DialogPage : PageBase, IDisposable, IFRSerializable, IParent
    Remarks

    Use the Controls property to add/remove controls to/from a dialog form.

    If you set the Visible property to false, this dialog form will be skippen when you run a report.

    Examples

    This example shows how to create a dialog form with one button in code.

    DialogPage form = new DialogPage();
    // set the width and height in pixels
    form.Width = 200;
    form.Height = 200;
    form.Name = "Form1";
    // create a button
    ButtonControl button = new ButtonControl();
    button.Location = new Point(20, 20);
    button.Size = new Size(75, 25);
    button.Text = "The button";
    // add the button to the form
    form.Controls.Add(button);

    Constructors

    DialogPage()

    Initializes a new instance of the DialogPage class.

    Declaration
    public DialogPage()

    Properties

    AcceptButton

    Gets or sets the button on the form that is clicked when the user presses the ENTER key. Wraps the System.Windows.Forms.Form.AcceptButton property.

    Declaration
    [TypeConverter(typeof(ComponentRefConverter))]
    public ButtonControl AcceptButton { get; set; }
    Property Value
    Type Description
    ButtonControl

    ActiveInWeb

    Gets or sets an active state in Web application.

    Declaration
    [Browsable(false)]
    public bool ActiveInWeb { get; set; }
    Property Value
    Type Description
    System.Boolean

    AutoScaleDimensions

    Gets the auto scale dimensions for this form.

    Declaration
    public SizeF AutoScaleDimensions { get; set; }
    Property Value
    Type Description
    System.Drawing.SizeF

    BackColor

    Gets or sets the background color for the form. Wraps the property.

    Declaration
    public Color BackColor { get; set; }
    Property Value
    Type Description
    System.Drawing.Color

    CancelButton

    Gets or sets the button control that is clicked when the user presses the ESC key. Wraps the System.Windows.Forms.Form.CancelButton property.

    Declaration
    [TypeConverter(typeof(ComponentRefConverter))]
    public ButtonControl CancelButton { get; set; }
    Property Value
    Type Description
    ButtonControl

    ClientSize

    Gets or sets the size of client area of the object.

    Declaration
    public override SizeF ClientSize { get; set; }
    Property Value
    Type Description
    System.Drawing.SizeF
    Overrides
    ComponentBase.ClientSize
    Remarks

    This property is used in the DialogPage class.

    Controls

    Gets the collection of controls contained within the form.

    Declaration
    [Browsable(false)]
    public DialogComponentCollection Controls { get; }
    Property Value
    Type Description
    DialogComponentCollection

    Font

    Gets or sets the font of the text displayed by the control. Wraps the System.Windows.Forms.Control.Font property.

    Declaration
    public Font Font { get; set; }
    Property Value
    Type Description
    System.Drawing.Font

    Form

    Gets an internal Form.

    Declaration
    [Browsable(false)]
    public Form Form { get; }
    Property Value
    Type Description
    System.Windows.Forms.Form

    FormBorderStyle

    Gets or sets the border style of the form. Wraps the System.Windows.Forms.Form.FormBorderStyle property.

    Declaration
    public FormBorderStyle FormBorderStyle { get; set; }
    Property Value
    Type Description
    System.Windows.Forms.FormBorderStyle

    FormClosedEvent

    Gets or sets a script method name that will be used to handle the FormClosed event.

    Declaration
    public string FormClosedEvent { get; set; }
    Property Value
    Type Description
    System.String

    FormClosingEvent

    Gets or sets a script method name that will be used to handle the FormClosing event.

    Declaration
    public string FormClosingEvent { get; set; }
    Property Value
    Type Description
    System.String

    Height

    Gets or sets the height of the object.

    Declaration
    public override float Height { get; set; }
    Property Value
    Type Description
    System.Single
    Overrides
    ComponentBase.Height
    Remarks

    This property value is measured in the screen pixels. Use Units class to convert a value to desired units.

    LoadEvent

    Gets or sets a script method name that will be used to handle the Load event.

    Declaration
    public string LoadEvent { get; set; }
    Property Value
    Type Description
    System.String

    PaintEvent

    Gets or sets a script method name that will be used to handle the Paint event.

    Declaration
    public string PaintEvent { get; set; }
    Property Value
    Type Description
    System.String

    ResizeEvent

    Gets or sets a script method name that will be used to handle the Resize event.

    Declaration
    public string ResizeEvent { get; set; }
    Property Value
    Type Description
    System.String

    RightToLeft

    Gets or sets a value indicating whether control's elements are aligned to support locales using right-to-left fonts. Wraps the System.Windows.Forms.Control.RightToLeft property.

    Declaration
    public RightToLeft RightToLeft { get; set; }
    Property Value
    Type Description
    System.Windows.Forms.RightToLeft

    ShownEvent

    Gets or sets a script method name that will be used to handle the Shown event.

    Declaration
    public string ShownEvent { get; set; }
    Property Value
    Type Description
    System.String

    Text

    Gets or sets the text associated with this form. Wraps the property.

    Declaration
    public string Text { get; set; }
    Property Value
    Type Description
    System.String

    Width

    Gets or sets the width of the object.

    Declaration
    public override float Width { get; set; }
    Property Value
    Type Description
    System.Single
    Overrides
    ComponentBase.Width
    Remarks

    This property value is measured in the screen pixels. Use Units class to convert a value to desired units.

    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.

    Assign(Base)

    Copies the contents of another, similar object.

    Declaration
    public override void Assign(Base source)
    Parameters
    Type Name Description
    Base source

    Source object to copy the contents from.

    Overrides
    ComponentBase.Assign(Base)
    Remarks

    Call Assign to copy the properties from another object of the same type. The standard form of a call to Assign is

    destination.Assign(source);

    which tells the destination object to copy the contents of the source object to itself. In this method, all child objects are ignored. If you want to copy child objects, use the AssignAll method.

    See Also
    AssignAll(Base)

    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.

    Deserialize(FRReader)

    Deserializes the object.

    Declaration
    public override void Deserialize(FRReader reader)
    Parameters
    Type Name Description
    FRReader reader

    Reader object.

    Overrides
    Base.Deserialize(FRReader)
    Remarks

    Do not call this method directly. You should override it if you are developing a new component for FastReport.

    This method is called when the object needs to restore the state. It may happen when:

    • loading the report from a file or stream;
    • loading the report from the designer's undo buffer;
    • assigning another object to this object using the Assign(Base) or AssignAll methods;
    • loading the object from the designer's clipboard;
    • loading the object from the preview pages.

    Dispose(Boolean)

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing
    Overrides
    Base.Dispose(Boolean)

    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.

    OnFormClosed(FormClosedEventArgs)

    This method fires the FormClosed event and the script code connected to the FormClosedEvent.

    Declaration
    public void OnFormClosed(FormClosedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.FormClosedEventArgs e

    Event data.

    OnFormClosing(FormClosingEventArgs)

    This method fires the FormClosing event and the script code connected to the FormClosingEvent.

    Declaration
    public void OnFormClosing(FormClosingEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.FormClosingEventArgs e

    Event data.

    OnLoad(EventArgs)

    This method fires the Load event and the script code connected to the LoadEvent.

    Declaration
    public void OnLoad(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    Event data.

    OnPaint(PaintEventArgs)

    This method fires the Paint event and the script code connected to the PaintEvent.

    Declaration
    public void OnPaint(PaintEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.PaintEventArgs e

    Event data.

    OnResize(EventArgs)

    This method fires the Resize event and the script code connected to the ResizeEvent.

    Declaration
    public void OnResize(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    Event data.

    OnShown(EventArgs)

    This method fires the Shown event and the script code connected to the ShownEvent.

    Declaration
    public void OnShown(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    Event data.

    RemoveChild(Base)

    Removes a specified object from this object's childs.

    Declaration
    public virtual void RemoveChild(Base child)
    Parameters
    Type Name Description
    Base child

    Serialize(FRWriter)

    Serializes the object.

    Declaration
    public override void Serialize(FRWriter writer)
    Parameters
    Type Name Description
    FRWriter writer

    Writer object.

    Overrides
    ComponentBase.Serialize(FRWriter)
    Remarks

    Do not call this method directly. You should override it if you are developing a new component for FastReport.

    This method is called when the object needs to save the state. It may happen when:

    • saving the report to the file or stream;
    • saving the report to the designer's undo buffer;
    • assigning the object to another object using the Assign(Base) or AssignAll methods;
    • saving the object to the designer's clipboard;
    • saving the object to the preview (when run a report).

    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.

    ShowDialog()

    Shows the form as a modal dialog box with the currently active window set as its owner. Wraps the System.Windows.Forms.Form.ShowDialog method.

    Declaration
    public DialogResult ShowDialog()
    Returns
    Type Description
    System.Windows.Forms.DialogResult

    One of the DialogResult values.

    ShowDialogAsync()

    Shows the form as a modal dialog box with the currently active window set as its owner. Wraps the System.Windows.Forms.Form.ShowDialog method. Uses async call to ShowDialog if possible.

    Declaration
    public async Task<DialogResult> ShowDialogAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Windows.Forms.DialogResult>

    One of the DialogResult values.

    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.

    Events

    FormClosed

    Occurs after the form is closed. Wraps the System.Windows.Forms.Form.FormClosed event.

    Declaration
    public event FormClosedEventHandler FormClosed
    Event Type
    Type Description
    System.Windows.Forms.FormClosedEventHandler

    FormClosing

    Occurs before the form is closed. Wraps the System.Windows.Forms.Form.FormClosing event.

    Declaration
    public event FormClosingEventHandler FormClosing
    Event Type
    Type Description
    System.Windows.Forms.FormClosingEventHandler

    Load

    Occurs before a form is displayed for the first time. Wraps the System.Windows.Forms.Form.Load event.

    Declaration
    public event EventHandler Load
    Event Type
    Type Description
    System.EventHandler

    Paint

    Occurs when the form is redrawn. Wraps the System.Windows.Forms.Control.Paint event.

    Declaration
    public event PaintEventHandler Paint
    Event Type
    Type Description
    System.Windows.Forms.PaintEventHandler

    Resize

    Occurs when the form is resized. Wraps the System.Windows.Forms.Control.Resize event.

    Declaration
    public event EventHandler Resize
    Event Type
    Type Description
    System.EventHandler

    Shown

    Occurs whenever the form is first displayed. Wraps the System.Windows.Forms.Form.Shown event.

    Declaration
    public event EventHandler Shown
    Event Type
    Type Description
    System.EventHandler

    Implements

    IFRSerializable
    IParent
    Back to top © 1998-2025 Copyright Fast Reports Inc.