Hi Bruno,
it doesn’t work.
I have a form with a clear button and some TWebEdit in a form (mapped on htmlform element)
I have this function :
{-----------------------------------------------------------------------------
Procedure: W_CLEARClick
-----------------------------------------------------------------------------}
procedure TGrpForm.W_CLEARClick(Sender: TObject);
var
i,
nb : integer;
aComp : TComponent;
begin
nb := Self.ComponentCount;
for i:=0 TO nb-1 do
begin
aComp := Self.Components[i];
ShowMessage(aComp.Name);
end; // THIS DOESN’T WORK
// SF CLEARING (I have 12 TWebEdit in this case)
for i := 0 to ControlCount - 1 do
if (pos('SF_',UpperCase(Controls[i].Name)) > 0)
then TWebEdit(Controls[i]).Text := ''; // THIS IS FORBIDDEN
//WAITER
W_DIVWAITER.Visible := false;
// RESULT
W_RESULT.Visible := false;
end;
How can I reach some properties of my TWebEdit components inside a loop ?
I don’t want use html feature as « reset ».
As the forms are not persistent, I have to use some tricks to keep the data between
them and when I browse my app. Muy method is to record some couple of data in global Tstringlist
before quit a form to reassign when I return on it. I can use each componeent one by one and
assign or keep each value. And using their name and a loop it makes sense to me.
IMPORTANT !!! In my last mail I ask you in which datatype must I have declare in pascal code to keep
a javascript variable declared from my main js file.
I have var Jsvar; and I want mapped it with pascal var.
At my opinion it would be very cool to have some structure as delphi
to navigate inside it and to have a form persistence feature without
being obliged each time to recreate the form
Thank you very much.