Цитата:
Сообщение от Страдалецъ
Собственно мой код почти повторяет код Janom (забыл страничку обновить)
|
Это да) но на TabSheet'ах у меня косякнуло) не искало кнопки... вот так правильнее будет:
Код:
var
i:Cardinal;
aTSh:TWinControl;
aBtn:TButton;
bool:boolean;
begin
aTSh:=TEdit(Sender).Parent;
bool:=false;
For i:=0 to aTSh.ControlCount-1 do
if aTSh.Controls[i].ClassType = TButton then
aBtn:=TButton(aTSh.Controls[i]);
for i:=0 to aTSh.ControlCount-1 do
begin
if aTSh.Controls[i].ClassType = TEdit then
if TEdit(aTSh.Controls[i]).Text='' then bool:=true;
if aBtn<>nil then aBtn.Enabled:=bool;
end;