ActiveForegroundColor

Gets or sets the ActiveForegroundColor of the control.

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

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

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

The ActiveForegroundColor 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 ActiveForegroundColor of the control
// If the control has a valid SGBEditStyleController, change teh ActiveForegroundColor of that.
public void SetActiveForegroundColor(SGBBaseControl control)
{
    if(control != null)
    {
       if (control.StyleController != null)
           control.StyleController.ActiveForegroundColor= Color.Red;
       else
           control.ActiveForegroundColor= Color.Red;
    }
}

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

Known Issues
None

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

Comments

No comments yet.