Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Win32 (http://www.go4expert.com/forums/win32/)
-   -   How can I refresh the expand sign in a treeview control ? (http://www.go4expert.com/forums/i-refresh-expand-sign-treeview-control-t15764/)

InvaderJOBO 9Jan2009 03:20

How can I refresh the expand sign in a treeview control ?
 
Hello...

I am working on a treeview control window and I would like to know how I can refresh the expand sign in front of it. If I add a new item into an existing item, the + sign do not show. I must double-click the item (expand it) for it to refresh...

Thanx...

shabbir 9Jan2009 10:26

Re: How can I refresh the expand sign in a treeview control ?
 
There is a property where + sign is always shown and so you need to set that property

InvaderJOBO 9Jan2009 21:55

Re: How can I refresh the expand sign in a treeview control ?
 
Is it a property or a style ? I'm using plain win32, not MFC...

I checked all the TVS_ and TVIF_ and none seems to be the right one... Guess it's back to digging in the MSDN doc...

carl1 10Jan2009 09:14

Re: How can I refresh the expand sign in a treeview control ?
 
No, it has nothing to do with the style.
Your code is just wrong.

shabbir 10Jan2009 10:27

Re: How can I refresh the expand sign in a treeview control ?
 
This code should help you.

Code:

        HTREEITEM hitem = tree.InsertItem(_T("Shabbir"));
        tree.InsertItem(_T("Another one"),hitem);
        tree.Expand(hitem,TVE_EXPAND);

tree is a CTreeCtrl object


All times are GMT +5.5. The time now is 14:36.