AGB  ·  Datenschutz  ·  Impressum  







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

In Combobox Linien einfügen

Ein Thema von tom_po · begonnen am 14. Feb 2006 · letzter Beitrag vom 19. Feb 2006
Antwort Antwort
tom_po

Registriert seit: 5. Feb 2006
137 Beiträge
 
Delphi 7 Enterprise
 
#1

Re: In Combobox Linien einfügen

  Alt 14. Feb 2006, 18:18
Habe in einem anderen Forum dies gefunden, geht aber nicht;

Delphi-Quellcode:
procedure TMainForm.TntComboBox7DrawItem(Control: TWinControl;
  Index: Integer; Rect: TRect; State: TOwnerDrawState);
begin
 with tntcombobox7, tntcombobox7.Canvas do
  begin
    FillRect(rect);
    if Items[index]='_linethen
    begin
      if odSelected in State then Pen.Color := clWindow
      else Pen.Color := clBlack;

      PenPos := Point(Rect.Left, Rect.Top+(ItemHeight div 2));
      LineTo(Rect.Right, Rect.Top+(ItemHeight div 2));
    end else
      TextOut(rect.Left+2,rect.Top,Items[index]);
  end;
end;

procedure TMainForm.TntComboBox7Click(Sender: TObject);
begin
if tntcombobox7.ItemIndex=0 then
output;
if tntcombobox7.ItemIndex=1 then
showinfopessoas;
if tntcombobox7.ItemIndex=2 then
showproddata;
if tntcombobox7.ItemIndex=3 then
showprodlinha;
end;
Style der Kombobox habe ich so geändert:

csOwnerDrawVariable
  Mit Zitat antworten Zitat
Antwort Antwort


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 00:21 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