ActiveReports3 Request technical support
Value Property
See Also  Example


Gets or sets the value of the control before formatting.

Syntax

Visual Basic (Declaration) 
Public Property Value As Object
Visual Basic (Usage)Copy Code
Dim instance As TextBox
Dim value As Object
 
instance.Value = value
 
value = instance.Value
C# 
public object Value {get; set;}

Return Value

An object that represents the current value of the control.

Example

C#Copy Code
private void detail_Format(object sender, System.EventArgs eArgs)
{
   
if (this.TextBox1.Value.ToString() == "10249")
   {
       
this.txtShippedDate.OutputFormat = "MMMM";
       
this.txtShippedDate.ForeColor = System.Drawing.Color.Crimson;
   }
   
else
   {
       
this.txtShippedDate.OutputFormat = "MMM";
       
this.txtShippedDate.ForeColor = System.Drawing.Color.Black;
   }
   
//use the following lines to be sure the OutputFormat
   
//is applied to every record
   
this.TextBox1.Value = this.TextBox1.Value;
   
this.txtShippedDate.Value = this.txtShippedDate.Value;
}
Visual BasicCopy Code
Private Sub Detail1_Format(ByVal sender As Object, ByVal e As System.EventArgs) Handles Detail1.Format
   If Me.TextBox1.Value = 10249 Then
      Me.TextBox2.OutputFormat = "$#,##0.00"
      Me.TextBox2.ForeColor = System.Drawing.Color.Crimson
   Else
      Me.TextBox2.OutputFormat = "¥#,##0"
      Me.TextBox2.ForeColor = System.Drawing.Color.BlueViolet
   End If
   'use the following lines to be sure the OutputFormat
   'is applied to every record
   Me.TextBox1.Value = Me.TextBox1.Value
   Me.TextBox2.Value = Me.TextBox2.Value
End Sub

See Also