Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Windos
win32.3rdparty
win32.directx.audio
win32.directx.ddk
win32.directx.graphics
win32.directx.input
win32.directx.managed
win32.directx.misc
win32.directx.networking
win32.directx.sdk
win32.directx.video
win32.dirx.grap.shaders
win32.gdi
win32.international
win32.kernel
win32.messaging
win32.mmedia
win32.networks
win32.ole
win32.rtc
win32.tapi
win32.tapi.beta
win32.tools
win32.ui
win32.wince
win32.wmi
windows.mediacenter
winfx.aero
winfx.announcements
winfx.avalon
winfx.collaboration
winfx.fundamentals
winfx.general
winfx.indigo
winfx.sdk
winfx.winfs
  
 
date: Tue, 29 Jul 2008 08:04:00 -0700,    group: microsoft.public.win32.programmer.ui        back       


?? Multiple Highlighted Colors of TreeNode ??   
Hi everyone,

I'm afraid there's no way to do this in .NET so I'm looking for a PInvoke 
solution.

I have a WinForm TreeView. Some nodes in the tree have a red or yellow 
background color (based on some business logic) while other nodes have the 
default (white) background color. This part works fine.

When the user selects a node, however, the background color of the node is 
always SystemColors.Highlight (a dark blue) while the node is selected, 
regardless of its pre-selected background color. I would like the background 
color of red or yellow nodes to be something other than dark blue when these 
nodes are selected. So basically, I am looking for a way to have three 
different "highlight colors" when a node is selected. The highlight color 
will be different for red, yellow or default nodes.

Does anyone know of a PInvoke way to do this?

Thank you
-- 
Tom Baxter
date: Tue, 29 Jul 2008 08:04:00 -0700   author:   Tom Baxter am

RE: ?? Multiple Highlighted Colors of TreeNode ??   
Dear Tom,

Thanks for your post,  I find you have posted this issue on 
microsoft.public.dotnet.framework.windowsforms, and I have replied you 
there, so let's discuss there, I'll close this one.

Sincerely,
Zhi-Xin Ye
Microsoft Managed Newsgroup Support Team

Delighting our customers is our #1 priority. We welcome your comments and 
suggestions about how we can improve the support we provide to you. Please 
feel free to let my manager know what you think of the level of service 
provided. You can send feedback directly to my manager at: 
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to 
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues 
where an initial response from the community or a Microsoft Support 
Engineer within 1 business day is acceptable. Please note that each follow 
up response may take approximately 2 business days as the support 
professional working with you may need further investigation to reach the 
most efficient resolution. The offering is not appropriate for situations 
that require urgent, real-time or phone-based interactions or complex 
project analysis and dump analysis issues. Issues of this nature are best 
handled working with a dedicated Microsoft Support Engineer by contacting 
Microsoft Customer Support Services (CSS) at 
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
date: Wed, 30 Jul 2008 04:52:51 GMT   author:   (Zhi-xin Ye)

Re: ?? Multiple Highlighted Colors of TreeNode ??   
Tom Baxter wrote:
> Hi everyone,
> 
> I'm afraid there's no way to do this in .NET so I'm looking for a PInvoke 
> solution.
> 
> I have a WinForm TreeView. Some nodes in the tree have a red or yellow 
> background color (based on some business logic) while other nodes have the 
> default (white) background color. This part works fine.
> 
> When the user selects a node, however, the background color of the node is 
> always SystemColors.Highlight (a dark blue) while the node is selected, 
> regardless of its pre-selected background color. I would like the background 
> color of red or yellow nodes to be something other than dark blue when these 
> nodes are selected. So basically, I am looking for a way to have three 
> different "highlight colors" when a node is selected. The highlight color 
> will be different for red, yellow or default nodes.
> 
> Does anyone know of a PInvoke way to do this?

I have no idea what PInvoke does, but I set the back colour by 
subclassing and handling the CustomDraw notification in the 
CDDS_ITEMPREPAINT stage by setting TVCD.clrTextBk.

-- 
Dean Earley (dean.earley@icode.co.uk)
i-Catcher Development Team

iCode Systems
date: Wed, 30 Jul 2008 11:16:40 +0100   author:   Dean Earley

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us