请问:… Memo_1.text:=Memo_1.text+#13#10;这段中主要是测试于回车,如果按了下回车则memo1.text 增加回车,比如我现在想:如果按下了回车,那么memo_1.txt的内容 不可再添加数据,怎么操作,相当于禁用了..Memo_1.text:=Memo_1.text+#13#10 and ?谢谢各位帮我解答下哈.

解决方案 »

  1.   

    memo的KeyPress事件判断
    if key=#13 then memo_1.enabled=False;
      

  2.   

    按下回车之后,把memo设为直读就行
      

  3.   

    不好意思``麻烦你了,,但是出了一项错误,我学delphi还没1个星期..[Error] main.pas(52): Incompatible types: 'String' and 'Boolean'
      

  4.   

    把你的代码右单击 去掉read only属性
      

  5.   

    if   key=#13  then
    memo1.readonly:=true
      

  6.   

    if   key=#13   then   memo_1.enabled:=False;加一个冒号......