Opened 8 years ago

Closed 8 years ago

#14613 closed defect (fixed)

Bad behaviour of CustomTreeControl check item with TR_FULL_ROW_HIGHLIGHT style

Reported by: wenzeslaus Owned by:
Priority: normal Milestone:
Component: AGW Version: 2.8.10
Keywords: CustomTreeControl Cc:
Blocked By: Blocking:
Patch: no

Description

Hi,

when TR_FULL_ROW_HIGHLIGHT style is used in CustomTreeControl, checkbox (if present) is checked by clicking on the item anywhere except for item name and icon.

Expected behaviour is that checkbox is (un)checked only by clicking on checkbox itself, like in CheckListBox widget. Also without TR_FULL_ROW_HIGHLIGHT style it works ok. You can easily test it with wxPython demo.

The problem is connected to hittest flags. I found a workaround for this - test if flag TREE_HITTEST_ONITEMCHECKICON is set and TREE_HITTEST_ONITEMLABEL is not and then veto the checking event.

Change History (1)

comment:1 Changed 8 years ago by AG

  • Resolution set to fixed
  • Status changed from new to closed

(In [72383]) - CustomTreeCtrl: don't check an item's checkbox if the mouse click was outside the checkbox area. Closes #14613.

Note: See TracTickets for help on using tickets.