码迷,mamicode.com
首页 > 其他好文 > 详细

TEdit的 Clear 和 赋值 ''

时间:2015-06-27 17:58:16      阅读:128      评论:0      收藏:0      [点我收藏+]

标签:

function TControl.GetText: TCaption;
var
  Len: Integer;
begin
  Len := GetTextLen;
  SetString(Result, PChar(nil), Len);
  if Len <> 0 then GetTextBuf(Pointer(Result), Len + 1);
end;

procedure TControl.SetText(const Value: TCaption);
begin
  if GetText <> Value then SetTextBuf(PChar(Value));
end;

 

procedure TCustomEdit.Clear;
begin
  SetWindowText(Handle, ‘‘);
end;

 

TEdit的 Clear 和 赋值 ''

标签:

原文地址:http://www.cnblogs.com/CodeGear/p/4604232.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!