Merhaba
Edit Text içerisine sadece ingilizce karakter girişi yapılması türkçe karakterleri değiştirmesi için şu fonksiyonu kullanıyorum ama küçük ı karakterini i olarak değiştirmiyor.
fonksiyon:
function ChEng (ch : char) : char;
begin
if (ch = 'Ğ') or (ch = 'ğ') then begin result:='G';exit;end;
if (ch = 'Ü') or (ch = 'ü') then begin result:='U';exit;end;
if (ch = 'Ş') or (ch = 'ş') then begin result:='S';exit;end;
if (ch = 'İ') or (ch = 'ı') then begin result:='I';exit;end;
if (ch = 'Ö') or (ch = 'ö') then begin result:='O';exit;end;
if (ch = 'Ç') or (ch = 'ç') then begin result:='C';exit;end;
if (ch = 'i') then begin result:='i';exit;end;
if (ch = 'ı') then begin result:='i';exit;end;
if (ch = 'I') then begin result:='i';exit;end;
result:=ch;
end;
onKeyUP içerisinde şu şekilde kullanıyorum. Burada hata nerede olabilir sadece küçük ı karakterinde sorun var.
tx:=copy(edtAdminTel.Text,0,length(edtAdminTel.Text)-1);
edtAdminTel.text:=tx+cheng(keyCHAR);
(02-05-2020, Saat: 12:31)41linea41 Adlı Kullanıcıdan Alıntı: [ -> ]Merhaba
Edit Text içerisine sadece ingilizce karakter girişi yapılması türkçe karakterleri değiştirmesi için şu fonksiyonu kullanıyorum ama küçük ı karakterini i olarak değiştirmiyor.
fonksiyon:
function ChEng (ch : char) : char;
begin
if (ch = 'Ğ') or (ch = 'ğ') then begin result:='G';exit;end;
if (ch = 'Ü') or (ch = 'ü') then begin result:='U';exit;end;
if (ch = 'Ş') or (ch = 'ş') then begin result:='S';exit;end;
if (ch = 'İ') or (ch = 'ı') then begin result:='I';exit;end;
if (ch = 'Ö') or (ch = 'ö') then begin result:='O';exit;end;
if (ch = 'Ç') or (ch = 'ç') then begin result:='C';exit;end;
if (ch = 'i') then begin result:='i';exit;end;
if (ch = 'ı') then begin result:='i';exit;end;
if (ch = 'I') then begin result:='i';exit;end;
result:=ch;
end;
onKeyUP içerisinde şu şekilde kullanıyorum. Burada hata nerede olabilir sadece küçük ı karakterinde sorun var.
tx:=copy(edtAdminTel.Text,0,length(edtAdminTel.Text)-1);
edtAdminTel.text:=tx+cheng(keyCHAR);
Merhaba,
kullanıcıyı veriyi girdikten sonra eğer bir button ile veri gidecek ise bir yere StringReplace fonksiyonu ile değiştirmenizi öneririm.
İyi çalışmalar.
function ChEng (ch : char) : char;
begin
if (ch = 'Ğ') or (ch = 'ğ') then begin result:='G';exit;end;
if (ch = 'Ü') or (ch = 'ü') then begin result:='U';exit;end;
if (ch = 'Ş') or (ch = 'ş') then begin result:='S';exit;end;
a) if (ch = 'İ') or (ch = 'ı') then begin result:='I';exit;end;
if (ch = 'Ö') or (ch = 'ö') then begin result:='O';exit;end;
if (ch = 'Ç') or (ch = 'ç') then begin result:='C';exit;end;
if (ch = 'i') then begin result:='i';exit;end;
b) if (ch = 'ı') then begin result:='i';exit;end;
if (ch = 'I') then begin result:='i';exit;end;
result:=ch;
end;
a satırından dolayı b satırına gelmez
Not : if yerine case kullansan daha verimli olabilir
(02-05-2020, Saat: 13:01)Halil Han Badem Adlı Kullanıcıdan Alıntı: [ -> ] (02-05-2020, Saat: 12:31)41linea41 Adlı Kullanıcıdan Alıntı: [ -> ]Merhaba
Edit Text içerisine sadece ingilizce karakter girişi yapılması türkçe karakterleri değiştirmesi için şu fonksiyonu kullanıyorum ama küçük ı karakterini i olarak değiştirmiyor.
fonksiyon:
function ChEng (ch : char) : char;
begin
if (ch = 'Ğ') or (ch = 'ğ') then begin result:='G';exit;end;
if (ch = 'Ü') or (ch = 'ü') then begin result:='U';exit;end;
if (ch = 'Ş') or (ch = 'ş') then begin result:='S';exit;end;
if (ch = 'İ') or (ch = 'ı') then begin result:='I';exit;end;
if (ch = 'Ö') or (ch = 'ö') then begin result:='O';exit;end;
if (ch = 'Ç') or (ch = 'ç') then begin result:='C';exit;end;
if (ch = 'i') then begin result:='i';exit;end;
if (ch = 'ı') then begin result:='i';exit;end;
if (ch = 'I') then begin result:='i';exit;end;
result:=ch;
end;
onKeyUP içerisinde şu şekilde kullanıyorum. Burada hata nerede olabilir sadece küçük ı karakterinde sorun var.
tx:=copy(edtAdminTel.Text,0,length(edtAdminTel.Text)-1);
edtAdminTel.text:=tx+cheng(keyCHAR);
Merhaba,
kullanıcıyı veriyi girdikten sonra eğer bir button ile veri gidecek ise bir yere StringReplace fonksiyonu ile değiştirmenizi öneririm.
İyi çalışmalar.
Butona bastığım da yaparsam kullanıcı adı ve şifresinin yanlış kaydedilmesine sebep olur.
Kullanıcı kayıt öncesi görmeli.
(02-05-2020, Saat: 13:44)meko Adlı Kullanıcıdan Alıntı: [ -> ]function ChEng (ch : char) : char;
begin
if (ch = 'Ğ') or (ch = 'ğ') then begin result:='G';exit;end;
if (ch = 'Ü') or (ch = 'ü') then begin result:='U';exit;end;
if (ch = 'Ş') or (ch = 'ş') then begin result:='S';exit;end;
a) if (ch = 'İ') or (ch = 'ı') then begin result:='I';exit;end;
if (ch = 'Ö') or (ch = 'ö') then begin result:='O';exit;end;
if (ch = 'Ç') or (ch = 'ç') then begin result:='C';exit;end;
if (ch = 'i') then begin result:='i';exit;end;
b) if (ch = 'ı') then begin result:='i';exit;end;
if (ch = 'I') then begin result:='i';exit;end;
result:=ch;
end;
a satırından dolayı b satırına gelmez
Not : if yerine case kullansan daha verimli olabilir
Kod alıntı olduğundan gözümden kaçan kısım buymuş.