NDateTimePicker with skins and palettes


Author
Message
Brad Swearingen
Brad Swearingen
Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)
Group: Forum Members
Posts: 53, Visits: 3

I've just started using an NDateTimePicker and noticed a couple of things with how it looks:

1) When I use a skin most of the skins do not draw a border around the calendar drop-down button when the control does not have the focus.  It seems there at least needs to be a line on the left of the button to separate the date with the button.  I've attached a screenshot which shows an example of this.

2) The NDateTimePicker does use the skin or palette but there are many colors that are not utilized by the widget.  Thus they stay the default colors regardless of which skin/palette I use.  I expected this widget to take advantage of the skin/palette fully like the rest of the N* widgets do.  Is there an expectation that I have to code for a palette/skin change event myself and then change the widgets Calendar***Color Properties?  Another way?

I'm using the 11.1.17.12 build.


Attachments
datetimepicker.gif (253 views, 5.00 KB)
Reply
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
Hello Brad,

1. You can change this behavior by creating your custom skin based on the one you use.
Then you should change the image which is used to paint the drop down button.

2. If you are using Windows Vista or Windows 7 and using themes such as Aero, then the properties that modifies the color of the calendar has no effect.
NDateTimePicker control derives from the standard DateTimePicker control and the colors of the calendar are set to a palettes colors in ApplyPalette virtual method.
Currently, the following calendar colors takes their values from palette:
CalendarForeColor = Palette.ControlText;
CalendarMonthBackground = Palette.Control;
CalendarTitleBackColor = Palette.ControlDark;
CalendarTrailingForeColor = NColorHelper.ToGrayScale(Palette.ControlText);

You can add additional colors by overriding ApplyPalette method.

Of course all, these settings will take effect if you are running it on windows XP or the visual styles of your application are not enabled.

Best Regards,
Nevron Support Team


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search