Salve, inserisco a runtime una textbox in un windows form e sto crecando di impostare l autocompletamento.
scrivo :
TextBox txtCommandInput = new TextBox();
txtCommandInput.Location = new System.Drawing.Point(3, 285);
txtCommandInput.Multiline = true;
txtCommandInput.Name = "txtInput";
txtCommandInput.RightToLeft = System.Windows.Forms.RightToLeft.No;
txtCommandInput.Size = new System.Drawing.Size(842, 47);
txtCommandInput.TabIndex = 0;
txtCommandInput.AcceptsReturn = true;
txtCommandInput.AcceptsTab = true;
txtCommandInput.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
txtCommandInput.AutoCompleteSource = AutoCompleteSource.CustomSource;
txtCommandInput.AutoCompleteCustomSource.AddRange( new string[]{"questa è una prova","Ciao mondo"});
non funziona. in cosa sbaglio?