InActiveBackgroundColor

Gets or sets the InActiveBackgroundColor of the selected Item in the control.

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

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

Remarks
The InActiveBackgroundColor property is the color used to paint the background of the control when it does not have the focus.

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

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

Known Issues
None

Last edited Mar 29, 2010 at 1:41 PM by scottgblood, version 3

Comments

No comments yet.