TMontCalendar는 Windows 래퍼 인 것처럼 보이므로 새 VCL 스타일에 영향을받지 않습니다. 해결책을 알고 있습니까?TMonthCalendar 및 Delphi 스타일 (Delphi XE2)
3
A
답변
6
TMonthCalendar
는 MONTHCAL_CLASS에 대한 래퍼이며, 지금까지 내가이 컨트롤이 소유자 그리기를 지원하지 않습니다 알고 있지만 달력의 요소의 색상을 설정하기 위해 허용 CalColors
속성을 제공하지만,이 속성에만 작동 테마는 사용할 수 없습니다. 먼저 SetWindowTheme 함수를 호출하여 캘린더에서 테마를 사용하지 않도록 설정 한 다음 색상을 vcl 스타일과 일치하도록 설정할 수 있습니다. 이
uses
Vcl.Styles,
Vcl.Themes,
uxTheme;
Procedure SetVclStylesColorsCalendar(MonthCalendar: TMonthCalendar);
Var
LTextColor, LBackColor : TColor;
begin
uxTheme.SetWindowTheme(MonthCalendar.Handle, '', '');//disable themes in the calendar
MonthCalendar.AutoSize:=True;//remove border
//get the vcl styles colors
LTextColor:=StyleServices.GetSystemColor(clWindowText);
LBackColor:=StyleServices.GetSystemColor(clWindow);
//set the colors of the calendar
MonthCalendar.CalColors.BackColor:=LBackColor;
MonthCalendar.CalColors.MonthBackColor:=LBackColor;
MonthCalendar.CalColors.TextColor:=LTextColor;
MonthCalendar.CalColors.TitleBackColor:=LBackColor;
MonthCalendar.CalColors.TitleTextColor:=LTextColor;
MonthCalendar.CalColors.TrailingTextColor:=LTextColor;
end;
그리고 결과 등
뭔가이 RRUZ 당신에게 솔루션을 제공 할 때까지 읽고 할 수 있습니다
+0
좋아 나는 거의 같았다. 하지만 네가 정말 더 분명하고 똑똑해! – philnext
관련 문제
- 1. DateToStr 및 Delphi XE2
- 2. Delphi XE2 스타일로 페인팅
- 3. Delphi xe2 및 filectrl 단위
- 4. Delphi XE2 : firemonkey 및 IDirect3DDevice9
- 5. Delphi Xe2 패키지 x64
- 6. Delphi XE2 TPointerList 사용
- 7. Delphi XE2 future
- 8. TThreadedStringList in delphi xe2
- 9. SafeMM for Delphi XE2
- 10. FastString Delphi XE2 대안
- 11. Delphi XE2 어셈블리
- 12. Delphi XE2 FireMonkey보고 옵션
- 13. Delphi XE2 Firemonkey 파일 다운로드?
- 14. Delphi XE2 FireMonkey and ssl
- 15. Delphi XE2 및 컨트롤 간의 라이브 바인딩
- 16. Delphi XE2 DBExpress Access Violation?
- 17. Delphi (XE2) 유니 코드 버전
- 18. Delphi XE2 modern looking MainMenu
- 19. Delphi XE2 코드 완성 깨짐
- 20. TRemotable 클래스의 Delphi XE2 제네릭
- 21. Delphi XE2 IdTCPClient - 데이터를받는 방법?
- 22. Delphi XE2 : OSX의 Delphi FireMonkey 앱에 PDF 표시
- 23. Delphi XE2 : 구성 요소에서 vcl 스타일 사용 안 함
- 24. Delphi XE2 VCL 스타일, 이상한 결함, 윈도우 보이지 않음
- 25. Delphi XE2 VCL 런타임 BPL이란 무엇입니까?
- 26. Delphi XE2 : VirtualBox의 보이지 않는 Firemonkey 컨트롤
- 27. Delphi XE2 TurboPower 구성 요소 상태
- 28. 도움이 필요하십니까? Delphi XE2 Enterprise 또는 Delphi XE2 Professional 사이에서 결정
- 29. 간단한 Delphi XE2 32 비트 VCL 구성 요소에 Delphi XE2 64 비트 지원을 추가하는 방법은 무엇입니까?
- 30. POPCNT in Delphi XE/XE2 64bit
에 대한 [VCL-스타일 앤 소유자가됩니다 -draw] (http://theroadtodelphi.wordpress.com/2012/03/14/vcl-styles-and-owner-draw/). 특히 [TStyleHook] (http://docwiki.embarcadero.com/Libraries/en/Vcl.Themes.TStyleHook). –
다음은 VCL 스타일을 사용하기 위해 TWebBrowser를 해킹 한 사용자입니다. http://theroadtodelphi.wordpress.com/2012/03/20/delphi-vcl-styles-and-twebbrowser-source-code-released/ –
그리고이 또한 도움이 될 수 있습니다. http://theroadtodelphi.wordpress.com/2012/03/14/vcl-styles-and-owner-draw/ –