dotnet / dotnet/winforms

Resizing an editable combobox triggers autocomplete

Open
#9,833 5 comments 1 reaction 0 assignees View on GitHub
Dominant language
C#
Stars
4.9k
Forks
1.1k
Avg merge
20h 23m
Merged PRs (30d)
103

Description

### .NET version

.NET SDK (reflecting any global.json):
Version: 6.0.413
Commit: 10710f7d8e

Runtime Environment:
OS Name: Windows
OS Version: 10.0.19045
OS Platform: Windows
RID: win10-x64
Base Path: D:\Program Files\dotnet\sdk\6.0.413\

global.json file:
Not found

Host:
Version: 6.0.21
Architecture: x64
Commit: e40b3abf1b

.NET SDKs installed:
6.0.413 [D:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.21 [D:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.21 [D:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.21 [D:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Download .NET:
https://aka.ms/dotnet-download

Learn about .NET Runtimes and SDKs:
https://aka.ms/dotnet/runtimes-sdk-info

### Did it work in .NET Framework?

Not tested/verified

### Did it work in any of the earlier releases of .NET Core or .NET 5+?

_No response_

### Issue description

Changing the width of an editable ComboBox, while the text contains a prefix of one of its options, causes the text to be replaced with that option. The value of `AutoCompleteMode` has no influence on this.

[combobox_bug.webm](https://github.com/dotnet/winforms/assets/5435495/fd44f124-8679-44f8-acb1-5b71b6c6f897)

### Steps to reproduce

- Create a combobox, setting anchors that cause it to resize with the window
- Fill the combobox with options
- Type in a text that is a prefix of one of the options
- Resize the window

Minimal reproducible program:
[combobox_bug_mrp.zip](https://github.com/dotnet/winforms/files/12499853/combobox_bug_mrp.zip)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.