AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

check TEdit field

Ein Thema von question · begonnen am 10. Okt 2013 · letzter Beitrag vom 11. Okt 2013
 
question

Registriert seit: 17. Apr 2013
97 Beiträge
 
#1

check TEdit field

  Alt 10. Okt 2013, 22:38
Hi,
I have a Form which contains six TEdit component, i would like to check whether the TEdit field is empty or not, i can do it with the following code
Code:
procedure TForm1.Button1Click(Sender: TObject);
begin

 if (Edit1.Text<>'')and (Edit2.Text<>'') and (Edit3.text<>'')
  and (Edit4.Text<>'')and (Edit5.Text<>'') and (Edit6.text<>'')then
    ShowMessage('Edit field not empty ')
  else
    ShowMessage('Edit fieldempty ')

end;
is it possible to do it in another way, for example
Code:
procedure TForm1.Button1Click(Sender: TObject);
begin

If (TEdit(Sender).Text <>'') then
     ShowMessage('Edit field not empty ')
  else
    ShowMessage('Edit fieldempty ')

end;
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 04:59 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz