Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check if Memo is Empty?

Status
Not open for further replies.

clifff

Programmer
Mar 22, 2002
20
MD
How to Check if Memo is Empty?
This doesnt work:
AnsiString s=Memo1->Text;
s.IsEmpty()
becose there are space symbols in the Memo.
cliff
 
If (Memo1->Text == "")
{
*/Perform Actions*/
}
 
I've tried it DOESNT work! I said that it contains some null characters.
I made a ShowMessage(Memo1->Text); it showed an empty box, even if i didnt edit in the memo...
Any ideas?
 
Do this work?
Code:
AnsiString s=Memo1->Text;
AnsiString S1 = s.Trim();
S1.IsEmpty()
James P. Cottingham

I am the Unknown lead by the Unknowing.
I have done so much with so little
for so long that I am now qualified
to do anything with nothing.
 
or you could count the chars..

Memo1->Text.Length(); ? My codes look like something a kid wrote
I have absolutely no idea what I am talking about
Somehow I still manage to make it work
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top