Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
125
UltraComboEditor - Set style of selected item
posted

Hi

I have a Winforms project, in which I have an UltraComboEditor. Some of the items that are represented in the UltraComboEditor are marked in a special way, to indicate that they are not in use. This is done when populating the items of the UltraComboEditor like so:

if (/*Some condition*/)
{
    comboTrees.Items[index].Appearance.ForeColor = SystemColors.InactiveCaptionText;
    comboTrees.Items[index].Appearance.FontData.Strikeout = DefaultableBoolean.True;
}

This gives a nice indication when the list is dropped down. Now, when an item is selected, I would like to keep that formatting, if it was not in use.

SubjectTree1, which is not in use, was selected - but when selected, it is not possible to see that it is not in use.

The only way I can achieve this is by setting the appearance for the entire UltraComboBox, making it look like all the items are not in use. Is there a way to only format the SelectedItem of an UltraComboEditor?

Best regards

   Lars

Parents Reply Children
No Data