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
Controlproperty, which is ofSystem.Windows.Forms.Controltype:
(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
TextBoxproperty, which is ofSystem.Windows.Forms.TextBoxtype and returns the wrapped TextBox control:
TextBox1.TextBox.ShortcutsEnabled = false;
Help on properties and methods of the controls can be accessed from the MSDN.