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.
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.