Hi All,
Quick question...is it possible, in Acc2k7, to selectively suppress the checkbox for certain nodes in a treeview (Microsoft Windows Common Controls 6.0 (SP6)): i.e. no checkbox for a parent node while its' child nodes do have checkboxes?
Thank you.
Treeview and checkboxes
-
- StarLounger
- Posts: 52
- Joined: 04 Feb 2010, 17:14
- Location: Brookings, South Dakota
Treeview and checkboxes
gary
Those who dance are considered insane by those who can't hear the music. - George Carlin
-
- Administrator
- Posts: 78574
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Treeview and checkboxes
Apparently it is possible by creating a custom drawing routine for the treeview. There's an example in C++ (?): TreeView: Enable checkboxes but hide checkbox for childnodes.; perhaps you can adapt it for VBA...
Best wishes,
Hans
Hans
-
- 4StarLounger
- Posts: 482
- Joined: 24 Jan 2010, 15:02
- Location: Colorado, USA
Re: Treeview and checkboxes
Hi Gary,
If you find that approach too brain-damaging, you might consider an alternative treeview. One that we used with excellent success is ctTree.ocx from DBI Technologies - it is much more robust that is from Microsoft, and has the ability to have check boxes at any level from what I can tell. See ctTree | Navigational Tree Control for details.
If you find that approach too brain-damaging, you might consider an alternative treeview. One that we used with excellent success is ctTree.ocx from DBI Technologies - it is much more robust that is from Microsoft, and has the ability to have check boxes at any level from what I can tell. See ctTree | Navigational Tree Control for details.
Wendell
You can't see the view if you don't climb the mountain!
You can't see the view if you don't climb the mountain!
-
- StarLounger
- Posts: 52
- Joined: 04 Feb 2010, 17:14
- Location: Brookings, South Dakota
Re: Treeview and checkboxes
Thank you Hans and Wendell,
Sorry for the delay. Just before I got called away, I had been looking at what Hans mentioned. I couldn't find a DrawMode method in the Microsoft Windows Common Controls 6.0 (SP6) reference library (MSComctlLib), so that led me to think I'd need to write a COM, COM+, dll....some kind of add-in, and this project just isn't worth it.
Wendell. I briefly looked at your reference, and while I think it would be a very useful tool, at the moment and again, for this project, I don't think I could get anyone to spring for it.
Thank you both.
Sorry for the delay. Just before I got called away, I had been looking at what Hans mentioned. I couldn't find a DrawMode method in the Microsoft Windows Common Controls 6.0 (SP6) reference library (MSComctlLib), so that led me to think I'd need to write a COM, COM+, dll....some kind of add-in, and this project just isn't worth it.
Wendell. I briefly looked at your reference, and while I think it would be a very useful tool, at the moment and again, for this project, I don't think I could get anyone to spring for it.
Thank you both.
gary
Those who dance are considered insane by those who can't hear the music. - George Carlin
-
- Administrator
- Posts: 78574
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Treeview and checkboxes
If it's not an absolute requirement for your project, it's lot easier to do without it and work with the default capabilities of the treeview control.
Best wishes,
Hans
Hans