Daisuke Shimamoto
Daisuke Shimamoto

Reputation: 5326

Setting Colour on the Editor part of UltraCalendarCombo

Does anyone know how to colour the editor part (where you can type in the date) for the UltraCalendarCombo (winforms one) programmatically (i.e. without using the Style Library files)?

I want to set the background to a different colour whenever the control has focus but can't find any properties or methods to do this.

Thanks

Upvotes: 0

Views: 712

Answers (2)

Daisuke Shimamoto
Daisuke Shimamoto

Reputation: 5326

I've actually figure this one out.

Steve's answer colours the editor part and the drop down part as well. You need to apply other Appearance properties as well.

// This is a copy from Steve's answer
// Directly via the BackColor property
ultraCalendarCombo1.BackColor = Color.Blue;

// Using an Appearance object
ultraCalendarCombo1.Appearance
    = new Infragistics.Win.Appearance { BackColor = Color.Blue };

// Now we set the drop down part to a different colour (Let's say white)
ultraCalendarCombo1.DropDownApperance
    = new Infragistics.Win.Appearance { BackColor = Color.White };

I believe you can do it by creating .isl (Infragistics Style Library) files but I wasn't quite sure how to swap these in and out programmatically.

Upvotes: 0

Steve Dignan
Steve Dignan

Reputation: 8550

If I understand you correctly, I believe you can do it one of 2 ways...

// Directly via the BackColor property
ultraCalendarCombo1.BackColor = Color.Blue;

// Using an Appearance object
ultraCalendarCombo1.Appearance = new Infragistics.Win.Appearance { BackColor = Color.Blue };

Upvotes: 2

Related Questions