TreeView Xojo plugin

DesktopTreeView.SetSelectionRenderer Method

Sets custom rendering routine for selection.

SetSelectionRenderer(
   renderer as SelectionRendererDelegate)

Parameters

renderer
Address of the rendering method.

Remarks

Normally you would set this in the Open event of the control.

This example will render the selection as rounded rect:


Public Function MyCustomSelectionRendering(node as TreeViewNode, g as Graphics, selectionColor as Color, x as Double, y as Double, width as Double, height as Double, actualWidth as Double, actualHeight as Double) As Boolean
#Pragma DisableBoundsChecking
#Pragma DisableBackgroundTasks

g.FillRoundRect(x , y, width , height, 10, 10)

return true
End Function




Using the pragmas in such rendering proc is good idea to not loose to much performance.

See Also

DesktopTreeView Control