The situation is. The ultracalendarcombo is used throughout a application. And they have a particular dropdown appearance.
Now, there is one case where I want to use the ultradatetimeeditor. How do format it so that when it drops down, it's style matches the one for the ultracalendarcombos?
I've played around with the DropDownAppearance, but had no success.
I don't think that you're going to get it to look *exactly* the same as the calendar combo, but there are a couple UI roles that are exposed through AppStylist, specifically DotNetMonthDropDown and DotNetMonthDropDownTitle, that may help you out here. I think that DotNetMonthDropDown is already covered by the DropDownAppearance, but there isn't a way to style the title area without this UI role, which was added for a bug fix.
-Matt
I have tried to change properties in the DropDownAppearance object in the UltraDateTimeEditor, but it has no effect. No matter what I change, the appearance of the calendar is always the same. It's like the control is ignoring them.
I'm using version 8.1.20081.2013 on Windows Vista 64.
what am I missing?
- Paul
Hi,
The UltraDateTimeEditor uses the Inbox MonthCalendar control as it's dropdown. I just tried this out and it appears that Microsoft changed this control in a recent release (VS2005, I think), so it looks a lot different than it used to, and it apparently no longer honors properties like BackColor and ForeColor. You can see this for yourself if you just place a MonthCalendar on a form. I tried setting BackColor, ForeColor, TitleBackColor, etc. and none of them have any effect. So this is either a bug in the MonthCalendar or Microsoft did it intentionally to always draw the control themed.
So I guess your best bet is to use the UltraCalendarCombo instead, which doesn't use any Microsoft controls.
EDIT: I noticed that if you turn off themes (by commenting out Application.EnableVisualStyles();), the MonthCalendar goes back to it's older appearance and then it honors the color settings.
Parimal,
The only way that I am aware of to change this color would be through AppStylist. There is a UIRole called 'DotNetMonthDropDownTitle' that corresponds to this area (as well as an additional DotNetMonthDropDown UIRole).
Thanks Matt
Can i have these UI roles in Version 7.1
Or i need to upgrade that. I also tried in 8.3 trial pack, but i was not able to do this.
You should definitely be able to do this in 8.3, since that's the version that I used; are you creating an ISL library and then loading this at run-time with the change to that UIRole? As I mentioned in your other thread, I'm not sure what version these roles were introduced in.