![]() |
Controls on list box items?
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)? |
Re: Controls on list box items?
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; |
Re: Controls on list box items?
No. I need controls on listbox items...
|
Re: Controls on list box items?
Ah, any specific reason ?
|
Re: Controls on list box items?
Zitat:
|
Re: Controls on list box items?
But then you have to repaint them yourself.
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 11:05 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