[Mono-bugs] [Bug 363360] New: TreeView HitTest is inaccurate with owner drawn checkboxes

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Feb 20 12:57:59 EST 2008


           Summary: TreeView HitTest is inaccurate with owner drawn
           Product: Mono: Class Libraries
           Version: 1.2.6
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: derekd at omni-ts.com
         QAContact: mono-bugs at lists.ximian.com
                CC: stephane at omni-ts.com
          Found By: ---

TreeView HitTest is inaccurate with owner drawn checkboxes

To reproduct:
1. Create a TreeView
2. Set CheckBoxes = false
3. Create an ImageList with 2 images
4. Set TreeView.StateImageList to the ImageList created above
5. Create some nodes and set the StateImageIndex to 0 for each of them
6. Run
7. Click on a checkbox.

(NOTE: see bug 363353 if the above setup causes an exception in Mono.)

Actual results:
The tree is expanded and collapsed after clicks on the checkbox rather than
clicks on the plus/minus. Click on the plus/minus does nothing.

Expected results:
Clicking the checkbox should do nothing since, in this example, no code has
been written to respond to it. Clicking on plus/minus should expand/collapse
the tree.

In code:
  TreeView.HitTest has:
        else if (checkboxes && IsCheckboxArea (n, x))
                return new TreeViewHitTestInfo (n,

    But that does not consider user-drawn check boxes when TreeView.checkboxes
= false

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list