Autor Beitrag
Sauger Chris
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 228

Win XP, Linux SuSE 9.2
Delphi 4,Delphi 7 Ent.
BeitragVerfasst: So 12.09.04 10:38 
Hi
ich möchte das listbox 2 und listbox 3 in
die gleiche höhe wie listbox 1 kommen.

bsp. ich makiere das item 10 (5 sicht bar) nun
soll listbox 2 und 3 in die gleiche höhe scrollen
wie listbox1.

Danke

Gruß

Sauger Chris
Lossy eX
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1048
Erhaltene Danke: 4



BeitragVerfasst: So 12.09.04 11:20 
Bei dem OnClick von ListBox1 weißt du der Eigenschaft TopIndex von ListBox2 und 3 den Wert von TopIndex der Listbox1 zu.
Zu verwirrend?

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure Form1.ListBox1OnClick(Sender: Tobject);
begin
  ListBox2.TopIndex := ListBox1.TopIndex;
  ListBox3.TopIndex := ListBox1.TopIndex;
end;

_________________
Nur die Menschheit ist arrogant genug, um zu glauben sie sei die einzige intelligente Lebensform im All. Wo nicht mal das nachhaltig bewiesen wurde.
Sauger Chris Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 228

Win XP, Linux SuSE 9.2
Delphi 4,Delphi 7 Ent.
BeitragVerfasst: Di 14.09.04 19:25 
hi

danke für deinen post aber ich habe das etwas anders gelöst

---------(Schnell Lösung)---------------

onclick funktion

listbox2.Selected[listbox1.ItemIndex] := true;
listbox3.Selected[listbox1.ItemIndex] := true;
listbox1.ScrollWidth := listbox1.ItemIndex +1;

aber deins ist schneller beim scrollen