Search Results for

    Show / Hide Table of Contents

    Referencing to a control from code

    Referencing to a control can be done by using its name:

    TextBoxControl1.Text = "my text";
    

    In fact, the FastReport's control is just a wrapper for the standard .NET Framework control. It wraps many, but not all, properties of the standard control. If you need some property that is not implemented by the FastReport control, you may access a wrapped standard control in the following way:

    • using the Control property, which is of System.Windows.Forms.Control type:
    (TextBox1.Control as TextBox).ShortcutsEnabled = false;
    
    • using the property which has the same name as the control itself, but without the "Control" suffix. For example, the TextBoxControl has got the TextBox property, which is of System.Windows.Forms.TextBox type and returns the wrapped TextBox control:
    TextBox1.TextBox.ShortcutsEnabled = false;
    

    Help on properties and methods of the controls can be accessed from the MSDN.

    Back to top © 1998-2026 Copyright Fast Reports Inc.