Autor Beitrag
Bergmann89
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1742
Erhaltene Danke: 72

Win7 x64, Ubuntu 11.10
Delphi 7 Personal, Lazarus/FPC 2.2.4, C, C++, C# (Visual Studio 2010), PHP, Java (Netbeans, Eclipse)
BeitragVerfasst: Sa 23.05.09 01:32 
Hi,

ich such n TreeView kombinert mit ner Checkox, so das jedes Item nochma ne eigene CheckBox hat.
Ähnlich wie bei der TCheckListBox. Gibts sowas schon? Wenn ja wo? Bzw. wie heißt das Ding?
Und es wäre auch toll wenn es so n ähnliches Design wie der TShelTreeView hat, weil ich damit Ordner darstellen möchte...
Schonma Danke für die Hilfe...

Mfg Bergman.

_________________
Ich weiß nicht viel, lern aber dafür umso schneller^^
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19315
Erhaltene Danke: 1747

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Sa 23.05.09 02:10 
Diese Komponente heißt TTreeView. :mrgreen:
Allerdings musst du in den Optionen auch toCheckSupport oder so ähnlich auf True setzen. ;-)
Bergmann89 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1742
Erhaltene Danke: 72

Win7 x64, Ubuntu 11.10
Delphi 7 Personal, Lazarus/FPC 2.2.4, C, C++, C# (Visual Studio 2010), PHP, Java (Netbeans, Eclipse)
BeitragVerfasst: Sa 23.05.09 14:20 
Hi,

ich hab den Objektinspektor jetzt vlt schon das 10 ma durchgeblättert, aber ich kann nix finden was irgendwas mit Checked zu tun hat...
Ich hab aber ne andere Idee, ich hab mir jetzt einfach ne ImageList gemacht, in der ich einma n Hacken und einma n Kreuz hab und dann mach ich das einfach über die ImageIndexe. So sollte das ja eig. auch gehen...

MfG Bergmann.

_________________
Ich weiß nicht viel, lern aber dafür umso schneller^^
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19315
Erhaltene Danke: 1747

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Sa 23.05.09 20:30 
:oops:
Ja, du hast Recht. Da merke ich wie lange ich schon nicht mehr mit der Originaltreeview gearbeitet habe. Die ist mir einfach zu unbequem und langsam.
Gehen tut es damit aber:
delphi.about.com/od/...sing/l/aa092104a.htm

Einzige Verbesserung gegenüber diesem Beispiel:
Mit SetWindowLong musst du keine eigene Komponente ableiten und kannst eine bestehende TreeView entsprechend ändern:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
const
  TVS_CHECKBOXES = $0100;
begin
  SetWindowLong(TreeView1.Handle, GWL_STYLE,
    GetWindowLong(TreeView1.Handle, GWL_STYLE) or TVS_CHECKBOXES);
Steku
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 23
Erhaltene Danke: 5



BeitragVerfasst: Sa 23.05.09 20:38 
Oder einfach die Jedi VCL installieren. Da
gibt es ein JvCheckTreeView... :-)

Gruß
Steku
Martok
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 3661
Erhaltene Danke: 604

Win 8.1, Win 10 x64
Pascal: Lazarus Snapshot, Delphi 7,2007; PHP, JS: WebStorm
BeitragVerfasst: Sa 23.05.09 20:53 
... oder TreeNT verwenden. Der Herr Lischke hat nämlich auch schon vor VirtualTreeView tolle Sachen gemacht ;)

_________________
"The phoenix's price isn't inevitable. It's not part of some deep balance built into the universe. It's just the parts of the game where you haven't figured out yet how to cheat."