B babyonce Unregistered / Unconfirmed GUEST, unregistred user! 2002-06-16 #1 问一个很菜的问题---怎么判断richedit的内容是否为空?
W wind2000 Unregistered / Unconfirmed GUEST, unregistred user! 2002-06-16 #3 楼上是错误的,RichEdit中可能含有非文本的对象,可以这样来判断: uses Clipbrd; ... procedure TForm1.Button1Click(Sender: TObject); begin Clipboard.Clear; RichEdit1.SelectAll; RichEdit1.CopyToClipboard; if Clipboard.FormatCount = 0 then showmessage('空'); end;
楼上是错误的,RichEdit中可能含有非文本的对象,可以这样来判断: uses Clipbrd; ... procedure TForm1.Button1Click(Sender: TObject); begin Clipboard.Clear; RichEdit1.SelectAll; RichEdit1.CopyToClipboard; if Clipboard.FormatCount = 0 then showmessage('空'); end;