Czesc !
Uzywam komponentu LabelEdit i chce jako nazwe wszystkich 10-ciu LabelEditow wstawic 'xxxxxx' jako nazwe (wtedy gdy uzytkownik nic nie wpisal). Uzywam takiego oto kodu :
for j:=1 to 10 do
begin
TPanel(FindComponent('LEdit'+IntToStr(j))).Enabled := True;
TPanel(FindComponent('LEdit'+IntToStr(j))).Color := clWindow;
- TLabeledEdit(FindComponent('LEdit'+IntToStr(j)+'.'+'EditLabel') ).Caption := 'xxxxxx'; *<<<<<<<<< blad !!!
end;
Taki zapis jest lopatologiczny i brzydki :
LEdit1.EditLabel.Caption := 'xxxxxx';
LEdit2.EditLabel.Caption := 'xxxxxx';
LEdit3.EditLabel.Caption := 'xxxxxx';
LEdit4.EditLabel.Caption := 'xxxxxx';
LEdit5.EditLabel.Caption := 'xxxxxx';
LEdit6.EditLabel.Caption := 'xxxxxx';
LEdit7.EditLabel.Caption := 'xxxxxx';
LEdit8.EditLabel.Caption := 'xxxxxx';
LEdit9.EditLabel.Caption := 'xxxxxx';
LEdit10.EditLabel.Caption := 'xxxxxx';
//zamiast pisac 3 posty obok siebie napisz wszystko w jednym watku. Zmiana nicka nic nie da - pedros