ActiveBackgroundColor

Gets or sets the ActiveBackgroundColor of the control.

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

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

Remarks
The ActiveBackgroundColor is the color used to paint the background of the control when it has the focus.

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

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

Known Issues
None

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

Comments

No comments yet.