Dear sirs,
how to check TRichViewEdit document's content is empty?
as is, when I call TRichViewEdit's Clear() method, I must check if user typed, or no. so I want to know how to check this condition.
thanks in advance.
how to check if the TRichViewEdit document content is empty?
Code: Select all
function IsEmpty(rve: TCustomRichViewEdit): Boolean;
begin
Result := (rve.ItemCount=0) or ((rve.ItemCount=1) and (rve.GetItemStyle(0)>=0) and (rve.GetItemText(0)=''));
end;
I tested, that's ok, thank you very much, proxy3d!!
I tested, that's ok, thank you very much, proxy3d!!