!!!!如何使DBGrid某列所有的内容显示为“*”,相当于Edit.PassWordChar功能!!!

thygw 2002-01-22 11:29:09
...全文
76 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
thygw 2002-01-22
  • 打赏
  • 举报
回复
没有那两个事件呀,我用的是adotable!
王集鹄 2002-01-22
  • 打赏
  • 举报
回复
procedure TForm1.Table1BDEDesignerGetText(Sender: TField; var Text: String;
DisplayText: Boolean);
begin
Text := '*******';
end;
wsf 2002-01-22
  • 打赏
  • 举报
回复
在"字段编辑器"里加入表字段,在OnGetText()中: Text:='*'
thygw 2002-01-22
  • 打赏
  • 举报
回复
怎么没有人告诉我呢?
thygw 2002-01-22
  • 打赏
  • 举报
回复
有点儿急!
王集鹄 2002-01-22
  • 打赏
  • 举报
回复
type
TForm1 = class(TForm)
ADOTable1: TADOTable;
procedure ADOTable1AfterOpen(DataSet: TDataSet);
private
procedure PasswordFiledGetText(Sender: TField; var Text: String;
DisplayText: Boolean);
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.PasswordFiledGetText(Sender: TField; var Text: String;
DisplayText: Boolean);
begin
Text := '*******';
end;

procedure TForm1.ADOTable1AfterOpen(DataSet: TDataSet);
begin
DataSet.FieldByName('<密码字段名>').OnGetText := PasswordFiledGetText;
end;
thygw 2002-01-22
  • 打赏
  • 举报
回复
?????????????????????????????????????????????????????????????????

828

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 非技术区
社区管理员
  • 非技术区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧