procedure TForm1.OnCreateInplaceEdit(Sender: TObject;
InplaceEdit: TControl; AOption: TCnBaseOption);
begin
if (InplaceEdit is TCustomEdit) and (AOption is TCnOptionItem) and
SameText(TCnOptionItem(AOption).PropName, 'Password') then
TEdit(InplaceEdit).PasswordChar := '*';
end;
这句能不能改成这样的:
if (InplaceEdit is TCustomEdit) and (AOption is TCnOptionItem) and
(pos('password',TCnOptionItem(AOption).PropName)>0) then
TEdit(InplaceEdit).PasswordChar := '*';
procedure TForm1.OnGetItemText(Sender: TObject; AOption: TCnOptionItem;
var AText: string);
begin
if SameText(TCnOptionItem(AOption).PropName, 'Password') then
AText := '******';
end;