Topic: Close Form and clear

Goodmorning, i have a question,
why when use a CLOSE FORM action with CLOSE BUTTON the form is not clear (to reopen i use SHOW FORM action)? After close form if reopen it have same value in grid or text box.
i send a small example project

Thank's

Post's attachments

Attachment icon example1.7z 273.33 kb, 555 downloads since 2014-08-28 

Re: Close Form and clear

Hello,


Action SHOW FORM just shows the form, this action does not clear the form.
Why in this example, you want to clean TableGrid?


But if you need that, you can use script, where you should create event OnShow of form gestPers, and clear manually.

procedure gestPers_OnShow (Sender: string; Action: string);
begin
     gestPers.TableGrid1.ClearRows;
end;
Dmitry.

Re: Close Form and clear

thank's,
this is only an example, in my application i have form with grid and  textboxs.
When close form it's possible to reset all form's component? When i reopen form don't too see old value or setting in grid and textbox.
There is a single script  command to close form and reset all form's component?

Thank's

Re: Close Form and clear

There is no a single command to reset all form's component.
You should do it manually

procedure gestPers_OnShow (Sender: string; Action: string);
begin
     gestPers.TableGrid1.ClearRows;
     gestPers.Edit1.Clear; // for clear textbox
     gestPers.Edit2.Clear; // for clear textbox
end;
Dmitry.

Re: Close Form and clear

ok ... thank's