This project is read-only.


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

public virtual Color SelectedItemForeColor { get; set; }

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

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.


// Change the SelectedItemForeColor property at runtime
public void SetCustomSelectedItemForeColor(SGBListBox control)
    if(control != null)
       control.SelectedItemForeColor = Color.Red;
' 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 12:54 PM by scottgblood, version 3


No comments yet.