繁体   English   中英

自动填充组合框仅在我尝试输入时显示第一个字母

[英]Autocomplete ComboBox only displays the first letter when I try and type in it

使用WinForms C#程序(轮询Google Places API)时遇到问题。

由于某种原因,我的组合框仅显示我键入的首字母。 当我输入字母时,它会删除旧字母并将其替换为新字母。

请帮我。 这是我正在使用的代码。

var request = new PlacesAutoCompleteRequest
{
    Key = "Not Telling",
    Input = comboBoxStreetAddress.Text,
    Sensor = true
};

var response = GooglePlaces.AutoComplete.Query(request);
var results = response.Predictions.ToArray();

AutoCompleteStringCollection array = new AutoCompleteStringCollection();

for (int x = 0; x < results.Count(); x++)
{
    array.Add(results[x].Description);
}

comboBoxStreetAddress.AutoCompleteCustomSource = array;

似乎您的问题可能在其他地方。 听起来有点像您每次输入字母时组合框都重新获得焦点。

当我尝试在 Xamarin Forms

[英]Only the first item in a list is rendered when I try to output a collectionview inside a collectionview in Xamarin Forms

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM