Description:
How to Implement a Hot Track Feature
Answer:
The Win32 TreeView control includes a HotTrack property. When set to True, it highlights node captions as the mouse pointer passes over them.
It is possible to implement the same functionality with the ExpressQuantumTreeList/Grid control via its CustomDraw capability. Write an OnMouseMove event handler and utilize the GetHitInfo method to get a TreeList's object under the mouse cursor. Special font styles are established for the node within the OnCustomDrawCell event handler, so it is painted as if highlighted. Please note it is necessary to call the InvalidateRect Win32 API function to force the TreeList to repaint.
In addition to node tracking, we implemented the same behavior for bands and columns. If you wish to make this feature available in your product, just copy private variables, methods and properties of the sample form and their implementation to your application. Then write an OnCreate event handler for your form similar to the sample application. Please note this code is also applicable to the ExpressDBTreeList and ExpressQuantumGrid.
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.