Treeview Properties

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I created a treeview and to finish I need to get solutions for the following
questions:

1. When the tree view is filled, it must get a default value as follows:
a. If the root doesn't have child, the root should be selected.
b. If the root has a child, default value should be the first child and
this root should be expanded.

2. Get the value from treeview.
How can I get the values from treeview, I mean the values: relative,
relationship, key and text. Is it possible?

3. How can I change the backcolor? At the moment is white, I would like to
change this color.

Anyone can help me?

Thanks
jcp
 
hi,
to check it node has children you can use .Children property, to get first
child you can use .Child property. to select node - set it .Selected
property to true
there are also properties to get key, text, etc
just look at object model

--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
 
I looked on help, but I couldn't do..

how can I give default value? For example, after fill the tree view, I woul
like the first child was selected ans expanded. If there isn't child, the
first root was selected. I believe is not very difficult, but I'm spend a lot
of time and until now, I couldn't do.

thanks
 
Hi alex again.
I get help from the COMCTL1.HLP file. do you know another helper file?
And backcolor do you have idea how can I change?

Thanks

Jose
 
Back
Top