0

I'm using Delphi Seattle, and have an edit and I want the typed text to be written in uppercase. I'm using this code:

procedure TF_Quiosque.edtCadNomeVisitanteChangeTracking(Sender: TObject);
begin
  edtCadNomeVisitante.Text := AnsiUpperCase(edtCadNomeVisitante.Text);
end;

The first letters come out correctly, but from the third letter the text begins to duplicate in Edit.

Tallys Ferrante
  • 173
  • 1
  • 13
  • First of all - don't use ansi function with unicode string, but in any way your code on Berlin works fine – Alex Egorov Mar 28 '17 at 17:23
  • @AlexEgorov I can't use Berlin right now. – Tallys Ferrante Mar 29 '17 at 11:23
  • This is not work under Android? For me this is works in Windows, can't check under Android now. Change your line to `edtCadNomeVisitante.Text := edtCadNomeVisitante.Text.UpperCase;` – Alex Egorov Mar 29 '17 at 11:34
  • @AlexEgorov In Windows works perfectly, the problem is under Android. I've tried `edtCadNomeVisitante.Text := edtCadNomeVisitante.Text.UpperCase;`but the compiler returns an error of `There is no overloaded version of 'UpperCase' that can be called with these arguments` – Tallys Ferrante Mar 29 '17 at 11:54
  • My error - `edtCadNomeVisitante.Text.ToUpper` should be used – Alex Egorov Mar 29 '17 at 12:15
  • @AlexEgorov Your code worked after i disabled the Predictive Text. Thanks! – Tallys Ferrante Mar 29 '17 at 12:50

1 Answers1

0

you must choose the propertie of TEdit KeyboardType to Alphabet.

enter image description here

Community
  • 1
  • 1
Jefferson Rudolf
  • 161
  • 2
  • 11