Autor Beitrag
crakos
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 195


D2k5 Pers
BeitragVerfasst: Sa 07.05.05 16:18 
//////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
///////////////Erkentnisse aus diesem Thread:\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Ich muss aufs Edit feld zugreifen :arrow:
ausblenden Delphi-Quelltext
1:
 procedure TForm1.Edit1keypress(Sender: TObject; var Key: Char);					
//////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Warum schreibt der kein bla ins editfeld ? wenn ich #13 durch 'a' ersetzte hilft auch net.
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure TForm1.formkeypress(Sender: TObject; var Key: Char);
  begin
    if key=#13 then
    edpassword.text:='bla';
  end;


Zuletzt bearbeitet von crakos am So 15.05.05 18:42, insgesamt 3-mal bearbeitet
WeBsPaCe
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: Sa 07.05.05 16:24 
Dein Code passt schon, aber das Ereignis tritt halt bei dir nicht ein. Das Formular muss ja aktiv sein, damit das OnKeyPress vom Formular ausgelöst wird. Zudem glaub ich nicht, dass #13 ein a ist... Aber da kann ich mich täuschen. :nixweiss:

Probier's doch einfach mal bei EdPasswd.OnKeyPress aus. ;)
crakos Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 195


D2k5 Pers
BeitragVerfasst: Sa 07.05.05 16:28 
klar ist #13 kein 'a'
#13 ist enter ;)
und danke, lag daran, war ja im editfeld und nicht auf der form :D
WeBsPaCe
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: Sa 07.05.05 16:40 
Achso. Du wolltest ein Enter? Ich dachte bloß, wegen dem da:

user profile iconcrakos hat folgendes geschrieben:
Warum schreibt der kein bla ins editfeld ? wenn ich #13 durch 'a' ersetzte hilft auch net.
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure TForm1.formkeypress(Sender: TObject; var Key: Char);
  begin
    if key=#13 then
    edpassword.text:='bla';
  end;


Das hättest du durch VK_RETURN ersetzen können. ;)
crakos Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 195


D2k5 Pers
BeitragVerfasst: Sa 07.05.05 16:44 
ich mag aber #13 lieber :P ;)
achso danke :>