Autor Beitrag
A_Checker
Hält's aus hier
Beiträge: 14



BeitragVerfasst: Mo 22.03.10 17:47 
Hey,
ich hab jetzt ein programm programiert. bei diesem programm muss man nach zeit eine zahl in ein edit feld eingeben. nach dem man aber auf den butten gedrückt hat, muss man nochmal auf das edit feld klicken, um was einzugeben. wie kann ich es machen, dass der cursor sofort nach dem klick auf dem button im edit feld ist?


Moderiert von user profile iconNarses: Topic aus Sonstiges (Delphi) verschoben am Mo 22.03.2010 um 17:07
elundril
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3747
Erhaltene Danke: 123

Windows Vista, Ubuntu
Delphi 7 PE "Codename: Aurora", Eclipse Ganymede
BeitragVerfasst: Mo 22.03.10 17:50 
SetFocus ist die Methode des TEdits die du suchst. ;)

lg elundril

_________________
This Signature-Space is intentionally left blank.
Bei Beschwerden, bitte den Beschwerdebutton (gekennzeichnet mit PN) verwenden.
A_Checker Threadstarter
Hält's aus hier
Beiträge: 14



BeitragVerfasst: Mo 22.03.10 18:01 
super perfekt danke :D

ich hab noch ne kleine frage, wie kann ich jetzt, nachdem ich die zahl eingegeben habe mit enter den button zur auswertung betätigen?
Xentar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2077
Erhaltene Danke: 2

Win XP
Delphi 5 Ent., Delphi 2007 Prof
BeitragVerfasst: Mo 22.03.10 18:05 
user profile iconA_Checker hat folgendes geschrieben Zum zitierten Posting springen:
ich hab noch ne kleine frage, wie kann ich jetzt, nachdem ich die zahl eingegeben habe mit enter den button zur auswertung betätigen?

Eigentlich wäre dafür ja ein neuer Thread fällig..
Ich werd mal TButton.Default in den Raum, oder TEdit.OnKeyDown, und da dann auf Enter #13 abfragen.

_________________
PROGRAMMER: A device for converting coffee into software.
Xearox
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 260
Erhaltene Danke: 3



BeitragVerfasst: Mo 22.03.10 18:51 
user profile iconXentar hat folgendes geschrieben Zum zitierten Posting springen:
Ich werd mal TButton.Default in den Raum, oder TEdit.OnKeyDown, und da dann auf Enter #13 abfragen.


Was in den Raum?

Spucken? Krachen? :D

Ich glaube wohl eher, dass du das wort "Werfen" vergessen hast. 8)


Aber so wie du es vorgeschlagen hast, hatte ich es auch gemacht
Jakob_Ullmann
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1747
Erhaltene Danke: 15

Win 7, *Ubuntu GNU/Linux*
*Anjuta* (C, C++, Python), Geany (Vala), Lazarus (Pascal), Eclipse (Java)
BeitragVerfasst: Mo 22.03.10 19:08 
user profile iconXearox hat folgendes geschrieben Zum zitierten Posting springen:
Ich glaube wohl eher, dass du das wort "Werfen" vergessen hast. 8)


Dir ist aber schon bewusst, dass "d" und "f" auf der Tastatur direkt nebeneinander liegen??
FinnO
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1331
Erhaltene Danke: 123

Mac OSX, Arch
TypeScript (Webstorm), Kotlin, Clojure (IDEA), Golang (VSCode)
BeitragVerfasst: Mo 22.03.10 21:41 
nicht bei neo :D

hmm die default eigenschaft ist imho meistens ausreichend...