Forum > Databases
DB Component (continuous form)
xinyiman:
Please explain to me how I can read the contents of a TDBEdit through the click of a TButton placed on a SubForm? I looked at the example files but can not find what I need.
thank you very much
xinyiman:
Solved in this mode:
--- Code: ---var
i: integer;
app: string;
appC: TComponent;
begin
for i:=0 to (Sender as TButton).Parent.ComponentCount - 1 do
begin
if (Sender as TButton).Parent.Components[i].Name='DBEdit1' then
begin
appC:=(Sender as TButton).Parent.Components[i];
ShowMessage(TDBEdit(appC).Text);
end;
end;
--- End code ---
tito_livio:
Hello, I have fixed the TsubForm component for the current Lazarus version.
I have tested it on Windows 32 with little test project.
I attach the release.
Navigation
[0] Message Index
[*] Previous page