Page 1 of 1

Is there a quick way to check if a TRichViewEdit is blank?

Posted: Tue May 25, 2010 4:43 pm
by GC04
I need to check if a TRichViewEdit has been left blank. What is the best way to do this? Thanks.



GC

Posted: Tue May 25, 2010 5:14 pm
by Sergey Tkachenko
IsEmpty := (rve.ItemCount=0) or
((rve.ItemCount=1) and (rve.GetItemStyle(0)=0) and (rve.GetItemText(0)=''));

Posted: Tue May 25, 2010 6:08 pm
by GC04
Thanks, that worked perfectly!