SelectedItemForeColor

Gets or sets the Foreground Color of the selected Item in the control.

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

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

Remarks
The SelectedItemForeColor 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 SelectedItemForeColor property at runtime
public void SetCustomSelectedItemForeColor(SGBListBox control)
{
    if(control != null)
       control.SelectedItemForeColor = Color.Red;
}

vb.net
' Change the SelectedItemForeColor property at runtime
Public Sub SetCustomSelectedItemForeColor(ByVal control As SGBListBox) 
    If control IsNot Nothing Then 
        control.SelectedItemForeColor = Color.Red 
    End If 
End Sub 


Known Issues
In order for the control to use the SelectedItemForeColor property effectively the control must have the DrawMode set to OwnerDrawFixed, otherwise this property is ignored. This issue will hopefully be fixed in a future version of the control.

Last edited Mar 29, 2010 at 11:54 AM by scottgblood, version 3

Comments

No comments yet.