Autor Beitrag
John Sanson
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 72

WinXP,WinVista
Delphi(BDS2006, 5), C#(VS2005, BDS2006), VB6
BeitragVerfasst: Sa 04.02.06 22:44 
Hi.
Mit
Keys.Enter kann ich z.B. die Entertaste verwenden. wie kann ich mir jetzt eine Liste in einer ListBox schreiben wo die ganzen Tastennamen drauf sind. die befinden sich alle bei Key.[Tastenname].

gruß John
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: So 05.02.06 01:43 
ausblenden C#-Quelltext
1:
Listbox1.Items.AddRange(Enum.GetValues(typeof(Keys)))					

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!
Robert_G
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 416


Delphi32 (D2005 PE); Chrome/C# (VS2003 E/A, VS2005)
BeitragVerfasst: So 05.02.06 04:13 
user profile iconMotzi hat folgendes geschrieben:
ausblenden C#-Quelltext
1:
Listbox1.Items.AddRange(Enum.GetValues(typeof(Keys)))					
Eleganter finde ich die Verwendung von databinding:
ausblenden C#-Quelltext
1:
2:
3:
4:
Array keys = Enum.GetValues(typeof(Keys));

listBox1.DataSource = keys;
label1.DataBindings.Add(new Binding("Text", keys, ""));
John Sanson Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 72

WinXP,WinVista
Delphi(BDS2006, 5), C#(VS2005, BDS2006), VB6
BeitragVerfasst: So 05.02.06 11:31 
Titel: Danke
Danke. Genau so hab ich mir das vorgestellt. Die Einträge sind sogar in Reihenfolgen 0-255.