Witam. Dopiero zaczynam pisanie w Delphi. Chciałem napisać taki prosty program (pewnie się domyślicie do czego, ale o tym sza
), ale mam problem. Program używa Edit1, Edit2 i Button1. Problem w tym, że gdy wpiszę do Edit1 kilka znaków program uznaje, że nie ma co z tym zrobić i nic nie robi. Jak zrobić, żeby każdy znak w Edit1 był "brany osobno"? Za pomoc dam reputa
.
EDIT: Jeszcze jedno pytanie - mam funkcję ShowMessage. Jak zrobić, żeby pisać tam coś od nowej linijki?
Kod źródłowy dla Button1Click:
EDIT: Jeszcze jedno pytanie - mam funkcję ShowMessage. Jak zrobić, żeby pisać tam coś od nowej linijki?
Kod źródłowy dla Button1Click:
Kod:
procedure TForm1.Button1Click(Sender: TObject);
begin
if Edit1.text = ('a') then Edit2.text := ('%61');
if Edit1.text = ('b') then Edit2.text := ('%62');
if Edit1.text = ('c') then Edit2.text := ('%63');
if Edit1.text = ('d') then Edit2.text := ('%64');
if Edit1.text = ('e') then Edit2.text := ('%65');
if Edit1.text = ('f') then Edit2.text := ('%66');
if Edit1.text = ('g') then Edit2.text := ('%67');
if Edit1.text = ('h') then Edit2.text := ('%68');
if Edit1.text = ('i') then Edit2.text := ('%69');
if Edit1.text = ('j') then Edit2.text := ('%6A');
if Edit1.text = ('k') then Edit2.text := ('%6B');
if Edit1.text = ('l') then Edit2.text := ('%6C');
if Edit1.text = ('m') then Edit2.text := ('%6D');
if Edit1.text = ('n') then Edit2.text := ('%6E');
if Edit1.text = ('o') then Edit2.text := ('%6F');
if Edit1.text = ('p') then Edit2.text := ('%70');
if Edit1.text = ('q') then Edit2.text := ('%71');
if Edit1.text = ('r') then Edit2.text := ('%72');
if Edit1.text = ('s') then Edit2.text := ('%73');
if Edit1.text = ('t') then Edit2.text := ('%74');
if Edit1.text = ('u') then Edit2.text := ('%75');
if Edit1.text = ('v') then Edit2.text := ('%76');
if Edit1.text = ('w') then Edit2.text := ('%77');
if Edit1.text = ('x') then Edit2.text := ('%78');
if Edit1.text = ('y') then Edit2.text := ('%79');
if Edit1.text = ('z') then Edit2.text := ('%7A');
if Edit1.text = ('.') then Edit2.text := ('%2e');
if Edit1.text = (' ') then Edit2.text := ('%20');
end;
end.