Skip to content

Fix vertical scrollbar not rendering in RTL multiline TextBox - #14820

Merged
LeafShi1 merged 1 commit into
dotnet:mainfrom
LeafShi1:Fix_14801_vertical_scrollbar_render_issue_in_multiline_TextBox
Jul 29, 2026
Merged

Fix vertical scrollbar not rendering in RTL multiline TextBox#14820
LeafShi1 merged 1 commit into
dotnet:mainfrom
LeafShi1:Fix_14801_vertical_scrollbar_render_issue_in_multiline_TextBox

Conversation

@LeafShi1

@LeafShi1 LeafShi1 commented Jul 28, 2026

Copy link
Copy Markdown
Member

Fixes #14801

Root Cause

Vertical scrollbar not rendered in RTL multiline TextBox on .NET 11 because GetScrollBarPadding() doesn't check WS_EX_LEFTSCROLLBAR flag.

Proposed changes

  • TextBoxBase.GetScrollBarPadding(): Check WS_EX_LEFTSCROLLBAR flag; put scrollbar width in padding.Left if set, padding.Right otherwise.
  • TextBox.GetScrollBarPadding(): Override for design-time; check RightToLeft property when handle not created.

Customer Impact

  • Vertical scrollbar renders correctly in RTL multiline TextBox on .NET 11

Regression?

  • No

Risk

  • Minimal

Screenshots

Before

After enable RTL, the vertical scrollbar of the multiline TextBox on the left disappears completely,

image

After

Vertical scrollbar renders correctly in RTL multiline TextBox on .NET 11

image

Test methodology

  • Manually

Test environment(s)

  • 11.0.0-preview.7.26365.101

@KlausLoeffelmann KlausLoeffelmann left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good bug! Thanks!

@LeafShi1
LeafShi1 merged commit 4ba3b30 into dotnet:main Jul 29, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vertical scrollbar is not rendered when RightToLeft = Yes on multiline TextBox

2 participants