Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1635
TreeNodeExpansionIndicator question
posted

We have Windows Treeviews where we want the expansion indicators to be the arrows rather than + -. We created an AppStylist Windows 7 isl file for UltraGrids where the TreeNodeExpansionIndicator UIRole is left as not updated. We added the following code to our base TreeView control

[DllImport("uxtheme.dll", CharSet = CharSet.Unicode)]

private extern static int SetWindowTheme(IntPtr hWnd, string pszSubAppName, string pszSubIdList);

protected override void CreateHandle()

{

     base.CreateHandle();

     SetWindowTheme(this.Handle, "explorer", null);

}

This works great for Treeviews on Windows 7 machines, but on Windows XP SP3 machines, the + - expansion indicators still display. Would adding the arrows to the

TreeNodeExpansionIndicator UIRole have any effect for XP or does only apply to Infragistics tree views? Is there any solution for this? Thank you.

Ron