
Background Color of Selected Item in Tree
Yes, my class is a child of CTreeCtrl. I also have a child of CComboBox
that contains an instance of my treectrl. So when the user drops the
combobox down it has a tree in it.
So I tried setting the focus in the OnPaint() function, and also in the
OnLButtonUp function (both in CMyTreeCtrl), but neither of those worked.
Any other suggestions? I just want the L&F to be the same throughout the
app.
Thanks for the help.
Marty
Quote:
> > Hello all,
> > I have been working on a custom CTreeCtrl and for some reason when I
select
> > something in the tree the background color changes from white to gray
> > instead of the standard blue. I have a regular tree in the same dialog
and
> > it is blue as it should be. Is there something I need to set to get
this
> > back to the default color scheme?
> > Thanks
> > Marty
> What do you mean 'custom CTreeCtrl'? Is it child class from MFC-class
> CTreeCtrl? If it is right, do you have overrided member function
> OnPaint or something?
> If property "Show selection always" of CTreeCtrl is checked and focus
> is lost, then item is showed gray color instead of the standard blue.
> Does your CTreeCtrl have imput focus?
> -------------------------------------------------------
> AlarIT developer
> http://www.alarit.com