Skip to content

TextBox and MaskedTextBox.GetPositionFromCharIndex() and MaskedTextBox.GetCharIndexFromPosition() methods return the incorrect values #994

@John-Qiao

Description

@John-Qiao
  • Have you experienced this same bug with .NET Framework?: No

OS: RS4 X64
VS: Dev16 16.2.0 Preview 1.0 [28913.52.d16.2]
.NET Core: 3.0.100-preview6-011867 from Master branch

More Info:
This issue can repro in TextBox control too, but RichTextBox control works well.

Steps to reproduce:

  1. Install the .NET Core 3.0 SDK from https://github.com/dotnet/core-sdk for Master branch.
  2. Open the attached ‘.NETCoreTestcase’ .NET Core app in VS.
  3. Start it and observe the returned values from GetPositionFromCharIndex() and GetCharIndexFromPosition() methods in debugging result.
    NETCoreTestcase.zip

Actual:
Both of the returned values are 0.
NETCoreResult1

Expected:
These two methods should return the correct values, like it works in .NET Framework.
NETFrameworkResult1

Metadata

Metadata

Assignees

Labels

🪲 bugProduct bug (most likely)💥 regression-previewRegression from a preview releasetenet-compatibilityIncompatibility with previous versions or with WinForms for .NET Framework

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions