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
Create a form, add a TreevView with CheckBoxes=true and DrawMode=OwnerDrawText
In OnDrawNode event only set DrawDefault=true
Show the form: checkboxes are shown corrupted on the right border
The text was updated successfully, but these errors were encountered:
This is not a regression issue, can repro in .NET framework and .NET different versions with a TreevView setting its CheckBoxes=true and DrawMode=OwnerDrawText
@LeafShi1 can you see if this repros the same way in an MFC app and then we'll take a look. We should make sure we're aligned with how it behaves.
In the MFC project, the treeView control does not have a corresponding DrawMode property, so how to draw text is custom. When the text position is offset, the right border of the check box will be covered, as shown below.
So this should be a problem in winform. I submitted a PR for a fix.
.NET version
net8
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
Same issue as described in https://stackoverflow.com/q/69978042
DrawDefault=true is not rendering nodes correctly in checkboxes are present
Steps to reproduce
Create a form, add a TreevView with CheckBoxes=true and DrawMode=OwnerDrawText
In OnDrawNode event only set DrawDefault=true
Show the form: checkboxes are shown corrupted on the right border
The text was updated successfully, but these errors were encountered: