I’ve had a similar problem recently with a custom FileTreeView
in the examples below, I’d like to use the folder icons to open/close items
1. in this first example, I used drawTreeViewPlusMinus to draw the folder icon with a custom drawFileBrowserRow which doesn’t use icons:
in this example I have the same kind of double indent effect mentionned previously, because I can’t use the space that would be used by drawTreeViewPlusMinus() for files. The consequence is that folders and files at the same level doesn’t appear as such anymore.
2. I’ve made a second example where I use drawTreeViewPlusMinus for what it’s meant to be. and a simple variation on drawFileBrowserRow
here files and folders that are at the same level are aligned correctly, but now I’d like to get rid of the open/close arrows.
both of these solutions come close to what I want, but in both cases I’m not happy 100%happy with the output, what are my options?
I propose to:
- move some of the code in paintRecursively into a new virtual method to allow more customisation
- give access to the full row width during paintItem with hints about indentation and open/close area
- separate the indent-size from the open/close handle box size.
what do you think?