diff options
author | Nikita Voronchev <nikita.voronchev@ru.axxonsoft.com> | 2020-01-28 18:38:27 +0300 |
---|---|---|
committer | Alexander Köplinger <alex.koeplinger@outlook.com> | 2020-01-28 18:38:27 +0300 |
commit | e2b632e4a707e2b62a2b3c95f21a208266a14925 (patch) | |
tree | d86b530f8a7b3a815741c84569742e69c41c66e4 /external | |
parent | 1bfd3173624ffc875f4e91ca2efc8853f8f6caf0 (diff) |
[WinForms] Incorrect Tree Nodes drawing at the `OwnerDrawText` mode (#18605)
Assume we have the following form `MyForm`:
```
using System;
using System.Drawing;
using System.Windows.Forms;
namespace test_TreeView
{
public class MyForm : Form
{
TreeView treeView = new TreeView()
public MyForm()
{
treeView.Nodes.Add("root node");
treeView.Nodes[0].Nodes.Add("first child node");
treeView.BackColor = Color.Gray;
treeView.LineColor = Color.Yellow;
treeView.DrawMode = TreeViewDrawMode.OwnerDrawText;
treeView.DrawNode += treeView_DrawNode;
Controls.Add(treeView);
}
private void treeView_DrawNode(object sender, DrawTreeNodeEventArgs e)
{
var brush = new SolidBrush(Color.FromArgb(100, 255, 0, 0));
e.Graphics.FillRectangle(brush, e.Bounds);
}
}
}
```
The displayed result is
![image](https://user-images.githubusercontent.com/12382656/73263417-92872980-41e1-11ea-8f7c-7cecbb376b60.png)
One can see couple drawing issues:
* White rectangles under each `TreeNode`.
* The area of custom drawing (red rectangles) is shifted with respect to this white rectangles.
Current PR proposes the fix of this issues.
Co-authored-by: monojenkins <jo.shields+jenkins@xamarin.com>
Diffstat (limited to 'external')
m--------- | external/api-snapshot | 0 |
1 files changed, 0 insertions, 0 deletions
diff --git a/external/api-snapshot b/external/api-snapshot -Subproject 5f6d34ae3f35a3063f6084845fcdbd80393b3e1 +Subproject 5b8247e289d17cef9ff645e21d896ea75bfe632 |