Fórum Como Alterar o DisplayName e DisplayMask em RunTime #283116
27/05/2005
0
Pegar o Description eu consegui, só não consigo jogar o resultados no DisplyName
desde já agradeço a todos
[]s
Titanius
Curtir tópico
+ 0Posts
27/05/2005
Gandalf.nho
Gostei + 0
27/05/2005
Titanius
Criei uma procedure que abre a ConsDescricao, e vai tentar mudar o DisplayName, segue ela:
procedure TDM.PegaDesc(vTabela: string); var i: integer; begin with TbConsDescricao do begin ParamByName(´PTabela´).AsString := vTabela; Open; First; QrLocalizar.First; for i := 0 to QRLocalizar.FieldCount - 1 do begin QrLocalizar.Fields[i].DisplayName := Fields[i].AsString; if QrLocalizar.Fields[i].DataType in [ftCurrency, ftFloat, ftBCD] then QrLocalizar.Fields[i].DisplayMask := ´,0.00´; end; end; end;
Eu executaria esta Procedure no AfterOpen da QrLocalizar...
[]s
Gostei + 0
27/05/2005
Gandalf.nho
Gostei + 0
27/05/2005
Titanius
[b:26365e628f]
cannot assign to a read-only property
[/b:26365e628f]
Tá falando que é somente leitura, como pode ser somente leitura se eu posso mudar ele pelo OI
[]s
Gostei + 0
27/05/2005
Gandalf.nho
Gostei + 0
27/05/2005
Titanius
[]s
Gostei + 0
27/05/2005
Gandalf.nho
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)