fiorilli Posted July 15, 2019 Share Posted July 15, 2019 In VCL applications, a DBEdit updates its value according to the GetText event of a TField. In UniGui applications, this does not occur (Examples attached). How to solve? GetText.zip Quote Link to comment Share on other sites More sharing options...
belo Posted July 16, 2019 Share Posted July 16, 2019 Hi, The ID field of your XML is 2 in size Maybe this will solve ... procedure TMainForm.FDMemTable1IDGetText(Sender: TField; var Text: string; DisplayText: Boolean); begin if Sender.AsVariant = Null then Exit; Text := FormatFloat('00', StrToFloat(Sender.AsString)); end; procedure TMainForm.FDMemTable1IDSetText(Sender: TField; const Text: string); begin Sender.AsString := FormatFloat('00', StrToFloat(Text)); end; Regards, Eduardo Belo Quote Link to comment Share on other sites More sharing options...
fiorilli Posted July 16, 2019 Author Share Posted July 16, 2019 Thanks for the suggestion Eduardo, But that's not my problem. If you look at the source code I'm doing exactly the same thing with 4 digits. The problem is the UniDBEdit does not update with the GetText value, passing 2, 4 or N digits it "should" be updated equal to the VCL. ------------------------------------------------------------------ PT-BR: Obrigado pela sugestão Eduardo, Mas não é esse o meu problema. Se o olhar o código fonte estou fazendo exatamente a mesma coisa porém com 4 dígitos. O problema é o UniDBEdit não atualizar com o valor do GetText, passando 2, 4 ou N dígitos ele "deveria" ser atualizado igual ao VCL. Quote Link to comment Share on other sites More sharing options...
belo Posted July 16, 2019 Share Posted July 16, 2019 The problem is not the UniDBEdit but the UniDBGrid. If you disable the UniDBGrid, the error does not occur. Maybe this behavior is a bug. PT-BR: O problema não é o UniDBEdit e sim o UniDBGrid. Se você desativar o UniDBGrid não acontece o erro. Talvez esse comportamento seja um bug. Quote Link to comment Share on other sites More sharing options...
fiorilli Posted July 16, 2019 Author Share Posted July 16, 2019 I tested without grid as well and the problem occurred anyway. Can you provide an example? --------------------------- Testei sem o grid também e o problema ocorreu mesmo assim. Pode disponibilizar um exemplo? Quote Link to comment Share on other sites More sharing options...
fiorilli Posted July 19, 2019 Author Share Posted July 19, 2019 up Quote Link to comment Share on other sites More sharing options...
fiorilli Posted July 23, 2019 Author Share Posted July 23, 2019 up Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.