ERLEDIGT
JA
JA
ANTWORTEN
2
2
ZUGRIFFE
737
737
EMPFEHLEN
-
Hi,
Ich versuche grade (in c#) ein Programm zu schreiben, dass am Ort eines Mauskilcks auf Form1 eine Textbox erstellt.
Doch leider erscheint diese weder, noch sagt das Programm, dass der TabIndex auf ihr liegt. Ich hab auch überprüft, ob überhaupt eine Textbox erstellt wird und das Ergebnis war positiv.
Kann mir bitte jemand helfen
Gruß Didi
Code :1 2 3 4 5 6 7 8 9 10 11 12
TextBox temp = new TextBox();//neue Textbox temp.BackColor = System.Drawing.Color.Blue;//Die Farbe ist Blau temp.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;//setzen des Borderstyles temp.Size = new System.Drawing.Size(100, 20);//setzen der Größe temp.Location = e.Location;//setze den Ort der Box auf den Mauskilck temp.Visible = true;//mache temp sichtbar temp.LostFocus += new EventHandler(Textbox_LostFocus);//neuen Event handler hinzufügen temp.Select(); //den TabIndex auf die temp setzen Console.WriteLine("Selected: " + temp.ContainsFocus.ToString());//überprüfen, ob temp im Fokus ist
-
13.01.10 22:58 #2
- Registriert seit
- Aug 2001
- Ort
- Österreich, Stmk, Graz
- Beiträge
- 2.783
Hi.
Du musst die TextBox auch deinem Form hinzufügen.
Code csharp:1 2
// z.b. so: this.Controls.Add(temp);
lg,..With the first link the chain is forged. The first speech censored, the first thought forbidden, the first freedom denied, chains us all irrevocably.
Aaron Satie
Legends... are the spice of the universe, Mr. Data, because they have a way of sometimes coming true.
Captain Jean-Luc Picard, Stardate ~41294.5
Tutorials.de chattet. Hier gibts auch .net Support ^^
Klickt auf chattet und nutzt den Webchat, oder verbindet euch zu irc.tutorials.de - Channel #Tutorials.de
(moo)blog furred.net // SiteInfo für WP7 // Pastebin für WP7 // BlogEngine.net Extensions
-
Ach ja das hatte ich übersehen
danke
Gruß Didi
Ähnliche Themen
-
textbox
Von mooogli im Forum .NET CaféAntworten: 2Letzter Beitrag: 23.03.08, 21:44 -
TextBox
Von TheLuCKer im Forum Visual Basic 6.0Antworten: 2Letzter Beitrag: 07.11.04, 11:48 -
Textbox?
Von TheLuCKer im Forum Visual Basic 6.0Antworten: 1Letzter Beitrag: 30.10.04, 09:19 -
VB-Textbox>IE-Textbox
Von hugamann im Forum Visual Basic 6.0Antworten: 3Letzter Beitrag: 12.07.04, 20:00 -
TextBox
Von Alf im Forum .NET ArchivAntworten: 6Letzter Beitrag: 10.04.04, 12:21





Zitieren

Login





