Autor Beitrag
cartridge
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 209

Win XP
D4 Prof,D6 Prof
BeitragVerfasst: Mi 12.01.05 08:18 
Hallo Leute!

Ich habe ein Problem, wo ich denke, dass ich bald gar nichts mehr allein auf die Reihe bekomme... :(

Wie bekomme ich es hin, dass ich in einer Combobox auch im Eingabefeld (Eigenschaft Text) auch zeichnen lassen kann? Ich habe eine Schriftarten- Combo, die modal ist. Das Anzeigen der eingelesenen Schriften im Listenbereich der Kombo klappt einwandfrei, nur im Text- bzw Eingabefeld ist nichts zu sehen! :roll:

Hier ein Code-Schnipsel:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
procedure TOptionenDlg.CBFontDrawItem(Control: TWinControl; Index: Integer;
  Rect: TRect; State: TOwnerDrawState);
begin
  if Index > -1 then
    CBFont.Canvas.Font.Name:= CBFont.Items[Index]
  else
    CBFont.Canvas.Font.Name:= CBFont.Text;
  CBFont.Canvas.TextOut(Rect.Left + Font.Size, Rect.Top + 2, CBFont.Items[Index]);
end;


Ich denke, die Namen erklären sich so weit selber!

Ich hoffe, mir kann jmd helfen!

Gruß
Ingo