Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

treeview problem

Status
Not open for further replies.

novice001

Programmer
Jun 7, 2002
18
US
Hi guys,
Could anyone help me please... I'm not very proficient with visual c++...

I have a treeview control on the dialog form. It shows the data from the database. A function is getting the data and populates the treeview. It works fine. Then, there's a button "Refresh" which calls: m_treeview.deleteAllItems(); and then populates it again.

After i press this button the treeview becomes blank. Not exactly blank - there are the same items, i can move cursor from one to another and even get the names through the code, but the items are invisible on the form. I tried to change the text color, but it doesn't help. The problem comes from deleteAllItems() function - it's probably not just deleting items but also is changing some properties that makes them disappear.

Does anyone know what is the correct way to delete all the items from the treeview so that they could be easily added again?

I'm using MS VC++ .NET 2002
Thank you very much for any help.
 
I had also such problem and would be curious to see what is the trick there.

Ion Filipski
1c.bmp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top