AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Multimedia Delphi Custom list item drawing
Thema durchsuchen
Ansicht
Themen-Optionen

Custom list item drawing

Ein Thema von WojTec · begonnen am 10. Feb 2010 · letzter Beitrag vom 10. Feb 2010
Antwort Antwort
WojTec

Registriert seit: 17. Mai 2007
480 Beiträge
 
Delphi XE6 Professional
 
#1

Custom list item drawing

  Alt 10. Feb 2010, 13:09
I want to draw custom list. First line is bolded string, if is last item, should draw additional line in normal style, simple:

Delphi-Quellcode:
begin
  if Control is TCheckListBox then
  begin
    with TCheckListBox(Control) do
    begin
      Canvas.FillRect(Rect);

      Canvas.Font.Style := [fsBold];
      Canvas.TextOut(Rect.Left + 4, Rect.Top + 4, Items[Index]);

      if Index = Count - 1 then
      begin
        Canvas.Font.Style := [];
        Canvas.TextOut(Rect.Left + 4, Rect.Top + 21, OpenPictureDialog.FileName);
      end;
    end;
  end;
end;
But it's simple in theory only. This code changing font style only and drawind only Items[I] in default position. What to do to get result I want?
  Mit Zitat antworten Zitat
Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#2

Re: Custom list item drawing

  Alt 10. Feb 2010, 14:28
Sorry, but I don't get your problem.
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat
WojTec

Registriert seit: 17. Mai 2007
480 Beiträge
 
Delphi XE6 Professional
 
#3

Re: Custom list item drawing

  Alt 10. Feb 2010, 17:57
Is not actual for now - I changed list to standard list box
  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 07:02 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz