Fórum Rotina para configurar a propriedade tag #5817
20/05/2009
0
tservicos =class(tform)
class procedure TServicos.tag(xform: TForm);
end ; -- na implementacao da classe class procedure TServicos.tag(xform: TForm);
var
I, Y: integer;
S: string; begin
for y := 0 to ComponentCount - 1 do
begin
if (Components[y] is TComboBox) then
if Components[y].Tag = 1 then
if TComboBox(Components[y]).Text = EmptyStr then
begin
S := S + TComboBox(Components[y]).ImeName + #13;
end; end;
for I := 0 to ComponentCount - 1 do
begin
if (Components[i] is TEdit) then
if Components[i].Tag = 1 then
if TEdit(Components[i]).Text = EmptyStr then
begin
S := S + TEdit(Components[i]).ImeName + #13; end;
end; if S <> EmptyStr then
begin
raise
Exception.Create('Informe:'
+
#13 + S);
end; tambem usei o refectore para adicionar as units da tcombobox e tedits mais nao sei pq nao funcionou
Carlos Faria
Curtir tópico
+ 0Posts
20/05/2009
Carlos Faria
Gostei + 0
20/05/2009
Rodrigo Mourão
class procedure TServicos.tag(xform: TForm);
var
I, Y: integer;
S: string; begin
for y := 0 to xform.ComponentCount - 1 do
begin
if (xform.Components[y] is TComboBox) then
if xform.Components[y].Tag = 1 then
if TComboBox(xform.Components[y]).Text = EmptyStr then
begin
S := S + TComboBox(xform.Components[y]).ImeName + #13;
end; end;
for I := 0 to xform.ComponentCount - 1 do
begin
if (xform.Components[i] is TEdit) then
if xform.Components[i].Tag = 1 then
if TEdit(xform.Components[i]).Text = EmptyStr then
begin
S := S + TEdit(xform.Components[i]).ImeName + #13; end;
end; if S <> EmptyStr then
begin
raise
Exception.Create('Informe:'
+
#13 + S);
end; tambem usei o refectore para adicionar as units da tcombobox e tedits mais nao sei pq nao funcionou
Gostei + 0
20/05/2009
Carlos Faria
Gostei + 0
20/05/2009
Rodrigo Mourão
Tservico.Tag(self);
Simples assim !!!
Abs !!!
Gostei + 0
20/05/2009
Carlos Faria
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)