Hi, i need to translate several words from the ultracalendarcombo.i need my own routines and cannot work with the system localisation (culture system) or use local ressourcestrings of the project.i have several languages in a database which the user can edit by himself.so i need translate here the label
august;button todayand in the right picture Mai, Juni,Juli ....can anyone help me?thanks martin
Hi Martin,
The today button can be changed using the resource customizer (help topic: http://help.infragistics.com/NetAdvantage/WinForms/2011.1/CLR2.0/?page=Win_Assembly_Resource_Strings.html) and an example snippet is as follows:
Infragistics.Shared.ResourceCustomizer rc = null; rc = Infragistics.Win.UltraWinSchedule.Resources.Customizer; rc.SetCustomizedString("LDR_DateButton_DefCaption_Today", "new today caption");
As far as the other items (the month names) I believe that is just culture aware (change the UI Culture and the control should dislpay the month names in that culture) and we can't change it but let me dig a little deeper and see what I can come up with.
The header month (here shown as August) can be changed using a CreationFilter to target the MonthHeaderAreaUIElement and change it's child TextUIElement.Text as desired.
Snippet: if (parent is MonthHeaderAreaUIElement) { TextUIElement textEle = parent.GetDescendant(typeof (TextUIElement)) as TextUIElement; if (textEle != null) { textEle.Text = "New Month Header"; } }
To change the items in the popup is going to be a little more difficult. The text shown in the MonthPopupItemUIElement cannot be set directly and is set through the MonthPopupControl's GetText method which retrieves the Months Names (and Year) for the 3 prior and previous months from the current month selected.
You can use a CreationFilter to instead create other elements for the popup but you would also have to incorporate the functionality currently existing in the popup (mouse hover and selection).
You can also submit a feature request for us to consider adding to a future release if you prefer. If I may, can I ask what is the functional requirement that needs you to change the text that is displayed in the popup? Instead of displaying the month name and year what would you like to have show up there?