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 和 赋值 ''
时间: 2024-10-29 13:37:12