Hello everyone.
I'm looking for a way, prefferably a component, that can capture alle the
Caption and Hint strings on a form.
I have come up with the following:
procedure ComponentWrite(form:Tform);
var
i:integer;
f:textfile;
c:tcomponent;
begin
assignfile(f,'comp.log');
rewrite(f);
with form do begin
for i:=0 to ComponentCount-1
do begin
c:=Components[i];
if (c is TButton) then
begin
writeln(f,'TButton':12,'--- ',c.name:20,' = '{,c.caption:20,'
+Hint: '+c.hint});
end
else
if (c is TLabel) then
begin
writeln(f,'TLabel':12,'--- ',c.name:20,' = '{,c.caption:20,' +Hint:
'+c.hint});
end
else
if (c is TControl) then
begin
writeln(f,'TControl':12,'--- ',c.name:20,' = '{,c.caption:20,'
+Hint: '+c.hint});
end
else
if (c is TForm) then
begin
writeln(f,'TForm':12,'--- ',c.name:20,' = '{,c.caption:20,' +Hint:
'+c.hint});
end
else
if (c is TMenuitem) then
begin
writeln(f,'TMenuItem':12,'--- ',c.name:20,' = '{,c.caption:20,'
+Hint: '+c.hint});
end
else begin
writeln(f,'Unknown':12,'--- ',c.name:20);
end;
end;
end;
closefile(f);
end;
- When I call it from a form, eg. ComponentWrite(mainform), it does write
out all the components on the form.
The problem is, that I cannot get the captions and hints out, the way it is
written above.
- Is there a simple and generic way to do this.
PS: I know there are many shareware routines for this, but I would really
like to have my very own rutine with the different languages in a DBASE DB.
Please reply to my address below:
Sincerely Ren Michael Plambek
bx01...@post6.tele.dk