![]() |
Unicodefähiges TEdit
Hi all
Ich benötige ein Unicodefähiges TEdit. Leider bin ich in der Komponenten-Entwicklung ein absoluter Neuling und wäre daher froh, wenn mir jemand ein Beispiel geben könnte. Ich stelle mir etwas ähnliches vor wie in folgendem Code-Beispiel mit einem TLabel gemacht wurde:
Delphi-Quellcode:
Danke
TUnicodeLabel = class(TLabel)
private { Private declarations } WideText : WideString; procedure SetCaption(Value: WideString); protected { Protected declarations } procedure DoDrawText(var Rect: TRect; Flags: Longint); override; public { Public declarations } published { Published declarations } property Caption : WideString read WideText write SetCaption; end; implementation procedure TUnicodeLabel.DoDrawText(var Rect: TRect; Flags: Longint); begin Canvas.Font := Font; if not Enabled then begin Canvas.Font.Color := clBtnHighlight; ExtTextOutW(Canvas.Handle, 1,1, ETO_CLIPPED, @Rect, pWideChar(WideText), Length(WideText), nil); Canvas.Font.Color := clBtnShadow; end; ExtTextOutW(Canvas.Handle, 0,0, ETO_CLIPPED, @Rect, pWideChar(WideText), Length(WideText), nil); end; procedure TUnicodeLabel.SetCaption(Value: WideString); begin WideText:=Value; Invalidate; // repaint end; Che |
Re: Unicodefähiges TEdit
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 01:30 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz