Make the DEVEXPRESS date control correctly

zhaozj2021-02-16  100

Make the DevexPress date control correctly display Andy Kwok (andykwok@163.com)

TDXGridDatePopup is a component displayed in the DEVEXPRESS component. DevexPerss is a very powerful control, but in Chinese Windows, a date control will have a problem: no matter what the day is just a "star" word. Cause: This problem is not a problem with the DEVEXPRESS company code, just in different language versions, the format or text returned in the date function provided by the system is different. DevexPress is a survey of the surrument with a shortdayNames array. ShortdayNames: array [1..7] of string; shortdayNames is a string array, with seven elements, corresponding to the string of Monday to seven, in English Windows, its value is ['sunday', 'Monday " ...], in Chinese Windows, its value is ['Monday', 'Tuesday' ...]. DevexPress is the first letter to English, such as Sunday, returning S, so she used S: = {$ IFDEF Delphi3} WideString {$ ENDIF} (shortdayNames [j]) [1] to get, but in In Chinese Windows, it will return "star", and the problem is here. Modifying method: Open {program files} developIster Express Inc / ExpressinplaceEditors / Delphi 5 / Source / DXGRDATE.PAS, lookup s: = {$ IFDEF DELPHI3} WideString {$ ENDIF} (shortdayNames [j]) [1], then modify S: = {$ IFDEF Delphi3} WideString {$ ENDIF} (ShortdayNames [J]) [3]. Re-build DXGRDATE.PAS (you can add DXGRDATE.PAS to a project, recompile your project, DxGrdate.pas will recompile), then copy the associated DxGRDate.dcu to ../LIB. The problem will be solved.

转载请注明原文地址:https://www.9cbs.com/read-11141.html

New Post(0)