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

Submitted by:  Radek Polak <radekp>
Submitted on:  Wed 17 Aug 2005 11:28:45 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

(Jump to the original submission 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>
Project Member
Mon 31 Oct 2005 08:36:39 AM UTC, comment #7:

Closing per Radek's comment.

Deryk Robosson <drobosson>
Project 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>
Project Member
Sun 30 Oct 2005 01:33:11 PM UTC, comment #5:

Bump. Comment reminder for Radek for review.

Deryk Robosson <drobosson>
Project 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>
Project 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>
Project 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>
Project 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>
Project 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>
Project Member

 

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

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 7 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Wed 23 Nov 2005 04:55:27 PM UTCradekpAttached File-=>Added TreeView_Click_FinalUnifiedPatch.tar.gz, #3127
Mon 31 Oct 2005 08:36:39 AM UTCdrobossonStatusIn Progress=>Fixed
  Open/ClosedOpen=>Closed
Thu 18 Aug 2005 12:03:29 PM UTCdrobossonStatusConfirmed=>In Progress
Wed 17 Aug 2005 05:35:19 PM UTCradekpAttached File-=>Added TreeView_Click.patch, #2836
Wed 17 Aug 2005 01:37:54 PM UTCdrobossonStatusNone=>Confirmed
Wed 17 Aug 2005 11:28:45 AM UTCradekpAttached File-=>Added TreeView_Click.tar.gz, #2834

Back to the top


Powered by Savane 3.1-cleanup1