Professional UI Solutions
Site Map   /  Register


Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » Cexttreectrl and icon Collapse All
Subject Author Date
Borremans Pierre Jan 15, 2010 - 3:59 AM

I want to always showed icon in a cexttreectrlnot only when the item is selected or expanded. How to do that ?

Technical Support Jan 15, 2010 - 9:38 AM

The CExtTreeCtrl control supports two icons for each tree item: an icon displayed in expanded state and an icon displayed in collapsed state. The CExtTreeCtrl::TreeItemInfoGetPtr() method returns a pointer to a CExtTreeCtrl::TREEITEMINFO_t data structure describing tree item properties. The CExtTreeCtrl::TREEITEMINFO_t::m_nIconIndexCollapsed and CExtTreeCtrl::TREEITEMINFO_t::m_nIconIndexExpanded properties describe collapsed/expanded icon indices in the icons collection managed by the CExtTreeCtrl control. This icon collection can be accessed/modified using the CExtTreeCtrl::TreeIcon***() methods. As you can see, the CExtTreeCtrl control does not support tree item icons which are displayed dependently on the focused or selected state of the tree items. If some of the tree items in your app show or hide tree icons depending on their focused and/or selected state, then this visual effect is coded in scope of your app - such feature is not provided by Prof-UIS.