You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, how can i make the textbox accept the autocomplete suggestion by pressing TAB, i currently have sometihng like this:
private void editor_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Tab && autoCompleteMenu.Visible)
{
// Get the currently displayed suggestion
AutocompleteItem displayedSuggestion = autoCompleteMenu.Fragment.GetSuggestedItems().FirstOrDefault();
if (displayedSuggestion != null)
{
// Get the text of the displayed suggestion
string displayedText = displayedSuggestion.Text;
if (!string.IsNullOrEmpty(displayedText))
{
// Insert the displayed suggestion at the current caret position
textBox.InsertText(displayedText);
e.Handled = true; // Prevent the TAB key from moving focus to the next control
}
}
}
}
P.S this was gpt generated
The text was updated successfully, but these errors were encountered:
Hello, how can i make the textbox accept the autocomplete suggestion by pressing TAB, i currently have sometihng like this:
private void editor_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Tab && autoCompleteMenu.Visible)
{
// Get the currently displayed suggestion
AutocompleteItem displayedSuggestion = autoCompleteMenu.Fragment.GetSuggestedItems().FirstOrDefault();
The text was updated successfully, but these errors were encountered: