Jump to content
Fórum Script Brasil
  • 0

Limpa Campos


Turbo
 Share

Question

biggrin.gif

essa é muito boa, uma grande função pra colocar em uma dll, e parar d ter q digitar 1 a 1, q cansa para k.....

procedure LimpaCampos(XForm : TForm);

var

i: integer;

begin

for i := 0 to XForm.ComponentCount - 1 do begin

if XForm.Components is TEdit then

TEdit(XForm.Components).Text := '';

if XForm.Components is TMemo then

TMemo(XForm.Components).Text := '';

if XForm.Components is TMaskEdit then

TMaskEdit(XForm.Components).Text := '';

if XForm.Components is TCheckBox then

TCheckbox(XForm.Components).Checked := false;

if XForm.Components is TDBLookupComboBox then

TDBLookupComboBox(XForm.Components).KeyValue := '';

if XForm.Components is TRadioButton then

TRadioButton(Xform.Components).checked := false;

if XForm.Components is TDBRadioGroup then

TDBRadioGroup(XForm.Components).ItemIndex := -1;

if XForm.Components is TComboBox then begin

TComboBox(XForm.Components).ItemIndex := -1;

TComboBox(XForm.Components).text := '';

end;

end;

end;

[]´s

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Forum Statistics

    • Total Topics
      151k
    • Total Posts
      649.1k
×
×
  • Create New...