See Also

TextBox Class  | TextBox Members

Language

Visual Basic

C#

Show All

See Also Languages ActiveReports Send feedback to Data Dynamics

Value Property

Gets or sets the value of the control before formatting.

[Visual Basic]
Public Property Value As Object
[C#]
public object Value {get; set;}

Return Type

An object that represents the current value of the control.

Example

[C#] 

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 Basic] 

Private Sub Detail_Format(ByVal sender As Object, ByVal e As System.EventArgs) Handles Detail.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

TextBox Class  | TextBox Members

 

 


Copyright © 2004-2005 Data Dynamics, Ltd. All rights reserved.