martes, 24 de noviembre de 2015

unir variable concatenar variable

cont:=listagrupos.Items.Count; // lineas de un lisbox


for i:=0 to listbox1.Items.Count-1 do
begin

if(listbox1.Selected[i]) then
begin
showmessage(inttostr(i));
end;
end;






sincronizar 4 listbox
/******************

procedure TForm1.ListBox1Click(Sender: TObject);
var
n:byte;
begin
for n:=2 to 4 do
begin
(FindComponent('ListBox'+IntToStr(n))as TListBox).ItemIndex:=
(Sender as TListBox).ItemIndex;
end;
end;


/****************



sincronizar 2 listbox
/******************

procedure TForm1.ListBox1Click(Sender: TObject);
var
n:byte;
begin
for n:=1 to 2 do
begin
(FindComponent('ListBox'+IntToStr(n))as TListBox).ItemIndex:=
(Sender as TListBox).ItemIndex;
end;
end;


/****************

No hay comentarios: