trichview.support
Re: Has a RichViewEdit content / text |
Author |
Message |
Sergey Tkachenko |
Posted: 10/14/2004 20:22:08 IsEmpty := (RichViewEdit1->ItemCount==0) || ((RichViewEdit->ItemCount==1) && (RichViewEdit->GetItemStyle(0)==0) && (RichViewEdit->GetItemText(0)=="") && (RichViewEdit->GetItemPara(0)==0)); Checking for (RichViewEdit->GetItemStyle(0)==0) && (RichViewEdit->GetItemText(0)=="") may be replaced with (RichViewEdit->GetItemStyle(0)>=0). It depends on what do you mean by "empty document". The initial code assumes that document with modified text and paragraph attributes is not empty, even if contains no text and other content. > > Before I save a document I'd like to know if the document is completely empty. > I don't want to save empty documents. > |
Powered by ABC Amber Outlook Express Converter