AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

TComboBox DrawItem blinkender Cursor

Ein Thema von handson · begonnen am 11. Nov 2013 · letzter Beitrag vom 14. Nov 2013
 
handson

Registriert seit: 18. Jan 2007
Ort: Delmenhorst
113 Beiträge
 
Delphi 2007 Professional
 
#1

TComboBox DrawItem blinkender Cursor

  Alt 11. Nov 2013, 14:13
Hallo!

Ich habe ich ein komisches Phänomen. Ich will einige Einträge in der TComboBox andersfarbig darstellen. Dafür habe ich Style auf csOwnerDrawVariable gesetzt und bei OnDrawtItem folgenden
Code eingebaut:

Code:

procedure TFormArtikelCopy.WGDrawItem(Control: TWinControl; Index: Integer;
  Rect: TRect; State: TOwnerDrawState);
Var
  aCB : TComboBox;

begin
  If (Control IS TComboBox) Then
  Begin
    aCB := TComboBox(Control);
    If TWGStatus(aCB.Items.Objects[Index]).Inaktiv Then
    Begin
      aCB.Canvas.Font.Color := clSilver;
      aCB.Canvas.Font.Style := [fsItalic];
    End Else
    Begin
      aCB.Canvas.Font.Color := clBlack;
      aCB.Canvas.Font.Style := [];
    End;
    aCB.Canvas.TextRect(Rect, Rect.Left + 2, Rect.Top + 2, aCB.Items[Index]);
  End;
end;
Das funktioniert alles super gut. Allerdings habe ich in diesem Feld keinen blinkenden
Cursor mehr. Setzte ich den Style wieder zurück, ist er wieder da.
Wie bekomme ich den mit gesetzter Style-Variable wieder hin?

Danke für Tipps schon mal im Voraus!

Stephan
Stephan Faust
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 12:53 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 by Thomas Breitkreuz