NTreeList renderer drawing Hot text


https://www.nevron.com/Forum/Topic7299.aspx
Print Topic | Close Window

By Craig Swearingen - 11 Years Ago

I believe I found a bug in the NTreeList.  When drawing a group node the foreground text color being used from the palette is not the same reference as the one for a non-group node.  When using the Longhorn palette, for instance, this shows as a problem.  I've attached a picture using a Nevron sample TreeList window circling the differences.  Please consider fixing this in a future release.  I'm using 11.12.14.12 on Win7.  This is likely one line of code for you to fix.

To work around I'm trying to add a renderer so I can draw the group node text myself.  I've overridden the paintText method.  I've got this working but I can't determine how I can know if the group node is currently "Hot" (i.e, the mouse is hovering on it)  so I can use a different foreground color.  The paintText method has NTreeNode and NTreeViewExPaintContext parameters.  I've been looking around but haven't found the property or method on either which tells me the node is "Hot".  Can anyone explain how to know this?

By Craig Swearingen - 11 Years Ago

It didn't initially occur to me that the Hot state may not have to be a property available.  I added some code to my renderer to see if the mouse was over the node and TrackHotState was true instead.  I think my work around for this bug is complete now.  The NTreeList offers some nice features for rendering.

The Nevron drawing of the NTreeListGroupByNode foreground text color, however, should be changed to use the NUIManager.Palette.WindowText color instead.  (That's what my work around renderer does.)  Both the Nevron Longhorn and Blue palettes show its using a different color than this.