AGB  ·  Datenschutz  ·  Impressum  







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

Controls on list box items?

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

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

Controls on list box items?

  Alt 10. Feb 2010, 18:04
Hello,

I created simple, but nice list for display layers on image. This is very simple list based on TListBox with custom drawed items. Look nice, but is not too functional, because can't change layer visibility. And now is problem. Is possible add some clickable control to that list (for example button with image on it from image list component)?
  Mit Zitat antworten Zitat
alzaimar
(Moderator)

Registriert seit: 6. Mai 2005
Ort: Berlin
4.956 Beiträge
 
Delphi 2007 Enterprise
 
#2

Re: Controls on list box items?

  Alt 10. Feb 2010, 20:37
Try a scrollbox. You can create as many controls as you like at runtime.
Delphi-Quellcode:
procedure TForm15.Button1Click(Sender: TObject);
var
  i: Integer;
  CheckBox1: TCheckBox;

begin
  for i := 1 to 20 do begin
    CheckBox1 := TCheckBox.Create(Self);
    with CheckBox1 do begin
      Name := 'CheckBox' + intToStr(i);
      Parent := ScrollBox1;
      Left := 32;
      Top := 2 + 19 * i;
      Width := 97;
      Height := 17;
      Caption := 'CheckBox ' + intToStr(i);
      TabOrder := i - 1;
    end;
  end;
end;
"Wenn ist das Nunstruck git und Slotermeyer? Ja! Beiherhund das Oder die Flipperwaldt gersput!"
(Monty Python "Joke Warefare")
  Mit Zitat antworten Zitat
WojTec

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

Re: Controls on list box items?

  Alt 11. Feb 2010, 10:04
No. I need controls on listbox items...
  Mit Zitat antworten Zitat
alzaimar
(Moderator)

Registriert seit: 6. Mai 2005
Ort: Berlin
4.956 Beiträge
 
Delphi 2007 Enterprise
 
#4

Re: Controls on list box items?

  Alt 12. Feb 2010, 04:49
Ah, any specific reason ?
"Wenn ist das Nunstruck git und Slotermeyer? Ja! Beiherhund das Oder die Flipperwaldt gersput!"
(Monty Python "Joke Warefare")
  Mit Zitat antworten Zitat
Benutzerbild von toms
toms
(CodeLib-Manager)

Registriert seit: 10. Jun 2002
4.648 Beiträge
 
Delphi XE Professional
 
#5

Re: Controls on list box items?

  Alt 12. Feb 2010, 05:00
Zitat von WojTec:
No. I need controls on listbox items...
Just change the code from alzaimar: Replace TScrollBox with TListbox
Thomas
  Mit Zitat antworten Zitat
alzaimar
(Moderator)

Registriert seit: 6. Mai 2005
Ort: Berlin
4.956 Beiträge
 
Delphi 2007 Enterprise
 
#6

Re: Controls on list box items?

  Alt 12. Feb 2010, 05:07
But then you have to repaint them yourself.
"Wenn ist das Nunstruck git und Slotermeyer? Ja! Beiherhund das Oder die Flipperwaldt gersput!"
(Monty Python "Joke Warefare")
  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 16:38 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