InActiveForegroundColor

Gets or sets the InActiveForegroundColor of the control.

Syntax
c#
public virtual Color InActiveForegroundColor{ get; set; }

Property Value
Type: System.Drawing.Color
Default Value: System.Drawing.SystemColors.WindowText

Remarks
The InActiveForegroundColor property is the Forecolor used when the control has the focus.

The InActiveForegroundColor can be set directly in the control or via the StyleController property of the control. When used directly in the control this propery has no effect if the StyleController property is set to a valid SGBEditStyleController object.

Examples

c#
// Change the InActiveForegroundColor of the control
// If the control has a valid SGBEditStyleController, change teh InActiveForegroundColor of that.
public void SetInActiveForegroundColor(SGBBaseControl control)
{
    if(control != null)
    {
       if (control.StyleController != null)
           control.StyleController.InActiveForegroundColor= Color.Red;
       else
           control.InActiveForegroundColor = Color.Red;
    }
}

vb.net
' Change the InActiveForegroundColor of the control 
' If the control has a valid SGBEditStyleController, change the InActiveForegroundColor of that. 
Public Sub SetInActiveForegroundColor(ByVal control As SGBBaseControl) 
    If control IsNot Nothing Then 
        If control.StyleController IsNot Nothing Then 
            control.StyleController.InActiveForegroundColor = Color.Red 
        Else 
            control.InActiveForegroundColor = Color.Red 
        End If 
    End If 
End Sub 

Known Issues
None

Last edited Mar 29, 2010 at 2:42 PM by scottgblood, version 2

Comments

No comments yet.