Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Uncheck child nodes if parent node is unchecked in treeview

I'm trying to use a Treeview control. I'd like to have all child nodes be
automatically unchecked if a if I uncheck a parent node. Also, is there a
way to specify that if a node contains child nodes it'll automatically be
bold?

I've got drag 'n drop working on my treeview and so I'd like any parent
nodes to bold themselves.

I would love it if someone could help me with this. Even better; does
anyone know a really, really good and simple to understand novice to advanced
tutorial on how to program treeview controls? This would help prevent me
from bugging everyone about my treeview woes.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Uncheck child nodes if parent node is unchecked in treeview

Okay, so I found this post:

http://bytes.com/forum/thread388871.html

Which is extremely helpful. And essentially answers my question. But I'm
still open to a really good treeview control tutorial if anyone's got one.

Thanks

"Jonathan Brown" wrote:

I'm trying to use a Treeview control. I'd like to have all child nodes be
automatically unchecked if a if I uncheck a parent node. Also, is there a
way to specify that if a node contains child nodes it'll automatically be
bold?

I've got drag 'n drop working on my treeview and so I'd like any parent
nodes to bold themselves.

I would love it if someone could help me with this. Even better; does
anyone know a really, really good and simple to understand novice to advanced
tutorial on how to program treeview controls? This would help prevent me
from bugging everyone about my treeview woes.

  #3   Report Post  
Posted to microsoft.public.excel.programming
st st is offline
external usenet poster
 
Posts: 9
Default Uncheck child nodes if parent node is unchecked in treeview

"Jonathan Brown" сообщил/сообщила в новостях следующее: ...

I'm trying to use a Treeview control. I'd like to have all child nodes be
automatically unchecked if a if I uncheck a parent node. Also, is there a
way to specify that if a node contains child nodes it'll automatically be
bold?


1. You need to iterate the collection of children of the node being unchecked and uncheck each of them individually.

2. Yes, of course. 'Or' TVIS_BOLD constant to item style when adding it's children. Check Object Browser ([F2] key in VB) to see VB equivalents of TVM_SETITEM message (probably some method of TreeNode(?) object) and TVIS_BOLD constant (=&h10=16).
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Uncheck child nodes if parent node is unchecked in treeview

Could you explain a little more about your number 2 line? Is that supposed
to make any parent node bold if it contains child nodes? How would I use
that? Which event would I put that in?

"st" wrote:

"Jonathan Brown" сообщил/сообщила в новостях следующее: ...
I'm trying to use a Treeview control. I'd like to have all child nodes be
automatically unchecked if a if I uncheck a parent node. Also, is there a
way to specify that if a node contains child nodes it'll automatically be
bold?


1. You need to iterate the collection of children of the node being unchecked and uncheck each of them individually.

2. Yes, of course. 'Or' TVIS_BOLD constant to item style when adding it's children. Check Object Browser ([F2] key in VB) to see VB equivalents of TVM_SETITEM message (probably some method of TreeNode(?) object) and TVIS_BOLD constant (=&h10=16)

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I add nodes to child nodes of a radial diagram? jmDesktop Excel Programming 0 August 22nd 08 07:36 PM
Get only child nodes? Satish Excel Programming 2 November 17th 06 08:48 AM
delete a node in treeview mark Excel Programming 1 May 15th 05 04:10 AM
treeview add nodes Serkan[_2_] Excel Programming 3 October 3rd 03 09:55 AM
TreeView: add more than one node to nodes collection Peter[_25_] Excel Programming 3 September 5th 03 12:15 PM


All times are GMT +1. The time now is 04:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright 2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"