Use this forum to ask questions after your subscription maintenance expires or before you buy. Need information on licensing or pricing? Questions about a trial version? This is the right place for you. No scripting questions, please.
Forum rules DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM. Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
This topic is 1 year and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
class NewTreeView : TreeView
{
protected override void WndProc(ref Message m)
{
if (m.Msg == 0x203) // identified 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);
}
}
- This code demonstrates that it works: https://paste.ofcode.org/jQunnaGsJy2KYgvwaSNpsr
- The fix requires c# inheritance of the existing TreeView class
- AFAIK, such a fix cannot be applied to the existing TreeView object after the main window load
Proposed solutions:
1. SPS includes this fix by default so that when we are adding TreeView control, it uses a fixed class
2. Give the users extended control over Show_MainForm_psf function content so I can manually replace
Nope, those solutions didn't work. The main problem is not the 'Expand' on double-click. It's the checkbox check being unregistered. You can clearly see this using my example code when you click on the checkbox but instead of it being checked, TreeViewDoubleClick and NodeMouseDoubleClick events are fired at once after a single left mouse button click.
I can do that but I can this be classified as a bug, not as a feature request? I know that Windows Forms is not something that you created and the bug is inherited. But if there is an easy and straightforward way to fix this, why not do it?
This topic is 1 year and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.