Search Results for

    Show / Hide Table of Contents

    Class HtmlObject

    Represents the Text object that may display one or several text lines.

    Inheritance
    System.Object
    Base
    ComponentBase
    ReportComponentBase
    BreakableComponent
    TextObjectBase
    HtmlObject
    Implements
    IFRSerializable
    Inherited Members
    TextObjectBase.AllowExpressions
    TextObjectBase.Brackets
    TextObjectBase.Text
    TextObjectBase.Padding
    TextObjectBase.HideZeros
    TextObjectBase.HideValue
    TextObjectBase.NullValue
    TextObjectBase.Format
    TextObjectBase.ProcessAt
    TextObjectBase.Formats
    TextObjectBase.Duplicates
    TextObjectBase.Value
    TextObjectBase.Editable
    TextObjectBase.DeserializeSubItems(FRReader)
    TextObjectBase.ExtractMacros()
    TextObjectBase.GetDisplayText()
    BreakableComponent.CanBreak
    BreakableComponent.BreakTo
    ReportComponentBase.BeforePrint
    ReportComponentBase.AfterPrint
    ReportComponentBase.AfterData
    ReportComponentBase.Click
    ReportComponentBase.Exportable
    ReportComponentBase.ExportableExpression
    ReportComponentBase.Border
    ReportComponentBase.Fill
    ReportComponentBase.FillColor
    ReportComponentBase.Bookmark
    ReportComponentBase.Hyperlink
    ReportComponentBase.CanGrow
    ReportComponentBase.CanShrink
    ReportComponentBase.GrowToBottom
    ReportComponentBase.ShiftMode
    ReportComponentBase.Style
    ReportComponentBase.EvenStyle
    ReportComponentBase.HoverStyle
    ReportComponentBase.EvenStylePriority
    ReportComponentBase.PageBreak
    ReportComponentBase.PrintOn
    ReportComponentBase.BeforePrintEvent
    ReportComponentBase.AfterPrintEvent
    ReportComponentBase.AfterDataEvent
    ReportComponentBase.ClickEvent
    ReportComponentBase.FlagSimpleBorder
    ReportComponentBase.FlagUseBorder
    ReportComponentBase.FlagUseFill
    ReportComponentBase.FlagPreviewVisible
    ReportComponentBase.FlagSerializeStyle
    ReportComponentBase.FlagProvidesHyperlinkValue
    ReportComponentBase.IsCompilationNeeded
    ReportComponentBase.Cursor
    ReportComponentBase.MouseMoveEvent
    ReportComponentBase.MouseUpEvent
    ReportComponentBase.MouseDownEvent
    ReportComponentBase.MouseEnterEvent
    ReportComponentBase.MouseLeaveEvent
    ReportComponentBase.ApplyStyle(Style)
    ReportComponentBase.SaveStyle()
    ReportComponentBase.RestoreStyle()
    ReportComponentBase.DrawBackground(FRPaintEventArgs)
    ReportComponentBase.IsVisible(FRPaintEventArgs)
    ReportComponentBase.Validate()
    ReportComponentBase.Deserialize(FRReader)
    ReportComponentBase.OnClick(EventArgs)
    ReportComponentBase.OnAfterLoad()
    ReportComponentBase.HasClickListeners()
    ReportComponentBase.ResetData()
    ReportComponentBase.InitializeComponent()
    ReportComponentBase.FinalizeComponent()
    ReportComponentBase.OnBeforePrint(EventArgs)
    ReportComponentBase.OnAfterPrint(EventArgs)
    ReportComponentBase.OnAfterData(EventArgs)
    ComponentBase.AbsBottom
    ComponentBase.AbsBounds
    ComponentBase.AbsLeft
    ComponentBase.AbsRight
    ComponentBase.AbsTop
    ComponentBase.Anchor
    ComponentBase.Bottom
    ComponentBase.Bounds
    ComponentBase.ClientSize
    ComponentBase.Dock
    ComponentBase.GroupIndex
    ComponentBase.Height
    ComponentBase.Left
    ComponentBase.Right
    ComponentBase.Tag
    ComponentBase.Top
    ComponentBase.Visible
    ComponentBase.VisibleExpression
    ComponentBase.Printable
    ComponentBase.PrintableExpression
    ComponentBase.Width
    ComponentBase.CalcVisibleExpression(String)
    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.ExtractDefaultMacros(String)
    Base.Dispose(Boolean)
    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.GetCustomScript()
    Base.IsHaveToConvert(Object)
    Base.GetConvertedObjects()
    Base.ForEachAllConvectedObjects(Object)
    Namespace: FastReport
    Assembly: FastReport.Base.dll
    Syntax
    public class HtmlObject : TextObjectBase, IDisposable, IFRSerializable
    Remarks

    Specify the object's text in the Text property. Text may contain expressions and data items, for example: "Today is [Date]". When report is running, all expressions are calculated and replaced with actual values, so the text would be "Today is 01.01.2008".

    The symbols used to find expressions in a text are set in the Brackets property. You also may disable expressions using the AllowExpressions property.

    To format an expression value, use the FastReport.Format property.

    Constructors

    HtmlObject()

    Initializes a new instance of the HtmlObject class with default settings.

    Declaration
    public HtmlObject()

    Properties

    RightToLeft

    Gets or sets a value that indicates whether the component should draw right-to-left for RTL languages.

    Declaration
    public bool RightToLeft { get; set; }
    Property Value
    Type Description
    System.Boolean

    Methods

    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
    TextObjectBase.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)

    Break(BreakableComponent)

    Breaks the contents of the object.

    Declaration
    public override bool Break(BreakableComponent breakTo)
    Parameters
    Type Name Description
    BreakableComponent breakTo

    Object to put the part of content to that does not fit in this object. These two objects must have the same type.

    Returns
    Type Description
    System.Boolean

    true if there is enough space in this object to display at least one text line.

    Overrides
    BreakableComponent.Break(BreakableComponent)
    Remarks

    Do not call this method directly, it is used by the report engine. You should override it if you are writing a new FastReport object.

    This method must break the contents of the object. The part of content that fit in current object's bounds should remain in this object, the part that does not fit should be transferred to breakTo object.

    CalcHeight()

    Calculates the object's height.

    Declaration
    public override float CalcHeight()
    Returns
    Type Description
    System.Single

    Actual object's height, in pixels.

    Overrides
    ReportComponentBase.CalcHeight()
    Remarks

    Applicable to objects that contain several text lines, such as TextObject. Returns the height needed to display all the text lines.

    CalcWidth()

    Calculates the object's width.

    Declaration
    public float CalcWidth()
    Returns
    Type Description
    System.Single

    The width, in pixels.

    Draw(FRPaintEventArgs)

    Declaration
    public override void Draw(FRPaintEventArgs e)
    Parameters
    Type Name Description
    FRPaintEventArgs e
    Overrides
    ReportComponentBase.Draw(FRPaintEventArgs)

    DrawText(FRPaintEventArgs)

    Draws a text.

    Declaration
    public void DrawText(FRPaintEventArgs e)
    Parameters
    Type Name Description
    FRPaintEventArgs e

    Paint event data.

    GetData()

    Gets the data from a datasource that the object is connected to.

    Declaration
    public override void GetData()
    Overrides
    ReportComponentBase.GetData()
    Remarks

    This method is called by the report engine before processing the object.

    Do not call it directly. You may override it if you are developing a new FastReport component. In this method you should get the data from a datasource that the object is connected to.

    GetDataAsync(CancellationToken)

    Declaration
    public override async Task GetDataAsync(CancellationToken cancellationToken)
    Parameters
    Type Name Description
    System.Threading.CancellationToken cancellationToken
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    ReportComponentBase.GetDataAsync(CancellationToken)

    GetExpressions()

    Gets all expressions contained in the object.

    Declaration
    public override string[] GetExpressions()
    Returns
    Type Description
    System.String[]

    Array of expressions or null if object contains no expressions.

    Overrides
    ReportComponentBase.GetExpressions()
    Remarks

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

    This method is called by FastReport each time before run a report. FastReport do this to collect all expressions and compile them. For example, GetExpressions method of the TextObject class parses the text and returns all expressions found in the text.

    RestoreState()

    Restores the object's state after printing it.

    Declaration
    public override void RestoreState()
    Overrides
    ReportComponentBase.RestoreState()
    Remarks

    This method is called by the report engine after processing the object.

    Do not call it directly. You may override it if you are developing a new FastReport component. In this method you should restore the object properties that were saved by the SaveState() method.

    SaveState()

    Saves the object's state before printing it.

    Declaration
    public override void SaveState()
    Overrides
    ReportComponentBase.SaveState()
    Remarks

    This method is called by the report engine before processing the object.

    Do not call it directly. You may override it if you are developing a new FastReport component. In this method you should save any object properties that may be changed during the object printing. The standard implementation saves the object's bounds, visibility, bookmark and hyperlink.

    Serialize(FRWriter)

    Serializes the object.

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

    Writer object.

    Overrides
    TextObjectBase.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).

    Implements

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