PyDataViewModel: HasValue never gets called when displaying DataViewCtrl

Hi All!

I have a DataViewCtrl in my project (wxPython v4.1.0a1) with a tree consisting of Words (parent nodes) and Examples (children nodes). The grid has two columns: “Words” (DataViewTextRenderer) and “Select” (DataViewCheckIconTextRenderer).

I’m trying to define checkboxes so that they would be shown for parent nodes only (words). For this I’m playing with HasContainerColumns and HasValue of PyDataViewModel:

  • from HasContainerColumns I return True for Select for parent object. This works and shows the checkboxes for parent nodes
  • from HasContainerColumns I return False for Select for children. This doesn’t work and doesn’t hide checkboxes for children nodes
  • from HasValue I tried to return the same configuration, but it seems to be never called at all.

Could anyone advise how I can disable checkboxes for children? Thank you!!

screen_000115!