treeview background

  • Thread starter Thread starter Michael S. Montoya
  • Start date Start date
M

Michael S. Montoya

Is is possible to make a treeview's background transparent or at least
select a desired color? I don't see that property anywhere...
 
At that website I see the following:

*****************
NOTE: Microsoft recommends that YOU DO not use this method of changing
the background color with the mscomctl.ocx version of the TreeView control.
If you do, it is at your own risk.
*****************

This is the version I use (I saw it was what was used in a sample database
somewhere). Is there a problem?
 
Hmm. Well spotted. I didn't see that. I have to say that that is a
pathetic disclaimer - they could at least give a clue about what they're
warning about. I don't have any experience of whether it does actually
cause any problem - I only have one treeview in general use and that is just
plain format. The thing that makes me suspcious is that the file versions
that they're talking about are ancient. comctl32.dll on my (2K) box is
version 5.81 compared to the 4.7 in that article.... and IE 4??????
(...just looked it up... IE4 released in October 1997)

I'd tend to suspect that it's a document that just hasn't been reviewed
correctly (though that's difficult to say for certain as they don't talk
about versions of mscomctl.ocx). So, my recommendations would be...

Go with the method and attempt to run some extensive tests before releasing
the db - automating the types of thing that the treeview is going to be used
for and looping repeatedly.

Avoid situations where updates to data are dependent on the treeview
functioning correctly - write data back before updating the treeview so that
if it does go bang, then users won't lose work that they've done.

Add in some easily switchable method of turning all formatting of the
treeview off - maybe a flag on the central db that identifies whether the
formatting should kick in or not.

Might also be worth posting a message to a pure VB format to see if the
warning is 'real'. They probably use it more.
 
Awesome..worked perfect...
with the node loop I was also able to specifiy a forecolor for the
letter color.

(now why hasn't microsoft started calling it a "font" color when it is
in regards to text???)
 
Back
Top