mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2026-05-14 20:24:47 +08:00
R26_dev8 - First public commit
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace CodeWalker.WinForms
|
||||
{
|
||||
public partial class TreeViewFix : TreeView
|
||||
{
|
||||
public TreeViewFix()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
protected override void OnPaint(PaintEventArgs pe)
|
||||
{
|
||||
base.OnPaint(pe);
|
||||
}
|
||||
|
||||
protected override void WndProc(ref Message m)
|
||||
{
|
||||
if (m.Msg == 0x203) // double click
|
||||
{
|
||||
var localPos = PointToClient(Cursor.Position);
|
||||
var hitTestInfo = HitTest(localPos);
|
||||
if (hitTestInfo.Location == TreeViewHitTestLocations.StateImage)
|
||||
m.Result = IntPtr.Zero;
|
||||
else
|
||||
base.WndProc(ref m);
|
||||
}
|
||||
else base.WndProc(ref m);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user