Topic: Script to clear values on Search form
Please give example of script to clear/empty text box on Search form when user click button bClear. Thanks. Where does one enter the script?
My Visual Database → Script → Script to clear values on Search form
Please give example of script to clear/empty text box on Search form when user click button bClear. Thanks. Where does one enter the script?
procedure Form1_bClear_OnClick (Sender: string; var Cancel: boolean);
begin
Form1.edLastname.Text := '';
Form1.edFirstname.Text := '';
Form1.dtDateOfBirth.Checked := False;
end;
Also you can download project for example.
Thanks. Its great. Exactly doing what I needed. Where can I get info about control events/procedures and parameters?
Under object inspector I discovered the "events" tab for the form controls. Double click next to event and it will create procedure header in the script.
ndinotamba
Right now i don't have any documentation, but script have same objects, procedures and events like in Delphi, this way you can read books about Delphi.
thanks, will look at Delphi stuff. What is correct syntax also to clear a tablegrid control, e.g.
frmEmployees.gridEmployees.List.Clear();
frmEmployees.gridEmployees.ClearRows;
Hi
I have a similar requirement. I need clear values in Search form and then show all values from table into table grid.
Thank you
skara22
Place button for clear and create event OnClick:
procedure Form1_bClear_OnClick (Sender: string; var Cancel: boolean);
begin
// clear values in components
Form1.edLastname.Text := '';
Form1.edFirstname.Text := '';
Form1.dtDateOfBirth.Checked := False;
// make click in button for search
Form1.bSearch.Click;
end;
Hi
I have a similar requirement. I need clear values in Search form in a ComboBox.
Thank you
Karacsonyi.Ladislau
Hello,
Form1.ComboBox1.dbItemID := -1;
how about clearing a date field? And where do we go to find the available settings?
timlitw
You can only uncheck date field
Form1.dtDateOfBirth.Checked := False;
Here you can find documentation, where available settings for controls
http://myvisualdatabase.com/forum/viewtopic.php?id=395
Thanks, that did it, I thought I tried that before- but it seems I did it wrong that time.
My Visual Database → Script → Script to clear values on Search form
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi