bugDotGNU Portable.NET - Bugs: bug #14163, TreeView does not raise Click and...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #14163: TreeView does not raise Click and DoubleClick events

Submitter:  Radek Polak <radekp>
Submitted:  Wed 17 Aug 2005 11:28:45 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Jump to the original submission

Wed 23 Nov 2005 04:55:27 PM UTC, comment #8: 

It looks like my patch was never commited to CVS. Can someone please do so? I am attaching version with nicer formated if and as unified diff.

Radek Polak <radekp>
Group Member
Mon 31 Oct 2005 08:36:39 AM UTC, comment #7: 

Closing per Radek's comment.

Deryk Robosson <drobosson>
Group Member
Mon 31 Oct 2005 05:53:46 AM UTC, comment #6: 

Let's be happy with the existing solution and close this bug. The second solution would need more digging into existing code and i dont feel like doing it now. We can reopen and redo it later.

Radek Polak <radekp>
Group Member
Sun 30 Oct 2005 01:33:11 PM UTC, comment #5: 

Bump.  Comment reminder for Radek for review.

Deryk Robosson <drobosson>
Group Member
Thu 18 Aug 2005 12:03:29 PM UTC, comment #4: 

Patch applied to CVS 18.Aug.05.  Will leave open per Radeks comment about reviewing and refining at a later date.

Deryk Robosson <drobosson>
Group Member
Wed 17 Aug 2005 05:35:19 PM UTC, comment #3: 

Here is patch fixing this bug. Problem is that TreeView is overriding ToolkitMouseDown method, which in parent class (Control) raises Click and DoubleClick. TreeView forgets to do this.

According to specifications it should raise these events only when cursor is above a node - and this is exactly what this patch does.

On MouseDown we check if we deal with click or double click. In ProcessClick method when called from MouseUp we fire Click/DoubleClick event when we come to selected node.

Note: another solution could be to use Control.flags variable and set NotifyClick/NotifyDoubleClick, but we cant do it now, because it's private. Also  ControlFlags enum and SetControlFlag method should be changed to internal, so that it can be called from TreeView. However this solution looks better then the one in my patch, because it saves one variable and fits more system. I will take a look at it later.

Radek Polak <radekp>
Group Member
Wed 17 Aug 2005 05:13:25 PM UTC, comment #2: 

TreeView has only ControlStyles.StandardDoubleClick, but that does not matter. Click and DoubleClick events work here non standard way (inherited from Control). These events are raised when clicked on child object (TreeNode). See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformscontrolclassclicktopic.asp

I will post patch for this bug.

Radek Polak <radekp>
Group Member
Wed 17 Aug 2005 01:37:54 PM UTC, comment #1: 

Took a quick gander at this and am able to confirm it.  The Click and DoubleClick events are meant to be inherited from Control.  In this control however, the ControlStyles.StandardClick is set to false.  Setting both that and ControlStyles.StandardDoubleClick to true changed nothing.  Not exactly sure what's going on without digging further when time permits (or if someone else wants to have a stab).

Deryk Robosson <drobosson>
Group Member
Wed 17 Aug 2005 11:28:45 AM UTC, original submission:  

TreeView does not raise Click and DoubleClick. According to documentation, these events should be raised when user clicks on any node inside TreeView.

Attached file is simple test case.

Radek Polak <radekp>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #2629:  TreeView_Click_FinalUnifiedPatch.tar.gz added by radekp (2KiB - application/x-tgz - Better formated unified diff for this bug)
file #3375:  TreeView_Click.patch added by radekp (3KiB - text/x-diff)
file #3373:  TreeView_Click.tar.gz added by radekp (525B - application/x-tgz - Unpack, make, run and see. Clicking on node does not raise click events.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 7 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-11-23 radekp Attached File- Added TreeView_Click_FinalUnifiedPatch.tar.gz, #3127
2005-10-31 drobosson StatusIn Progress Fixed
    Open/ClosedOpen Closed
2005-08-18 drobosson StatusConfirmed In Progress
2005-08-17 radekp Attached File- Added TreeView_Click.patch, #2836
2005-08-17 drobosson StatusNone Confirmed
2005-08-17 radekp Attached File- Added TreeView_Click.tar.gz, #2834

Back to the top

Powered by Savane 3.13-caa5.
Corresponding source code