Toster
Toster

Reputation: 381

How to set manually TDateTimePicker language?

I prepare a multilanguage application and I need to set up (from code) a month names in TDateTimePicker?

I know that this is dependent on the operating system version, but maybe another way?

Upvotes: 0

Views: 771

Answers (1)

SilverWarior
SilverWarior

Reputation: 8331

I'm afraid you won't be able to change the language for TDateTimePicker yourself. Why?

TDateTimePicker is just a wrapper for Windows common control that allows picking of time and date and therefore is dependent on windows language settings.

Also if you run your application with TDateTimePicker on different versions of Windows you will notice that it even looks differently

Date Time Picker on Windows XP Date Time Picker on Windows XP

Date Time Picker on Windows 7 Date Time Picker on Windows 7

Date Time Picker on Windows 10 Date Time Picker on Windows 10

Notice that while on Windows XP and Windows 7 TDateTimePicker is fully shown in Slovenian (my default OS language) on Windows 10 it fails to show all texts in it in Slovenian.

Upvotes: 3

Related Questions