Print Page | Close Window

Background color of CXTPRecentFileListBox

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=23946
Printed Date: 01 April 2020 at 5:11am


Topic: Background color of CXTPRecentFileListBox
Posted By: hiro-ta
Subject: Background color of CXTPRecentFileListBox
Date Posted: 27 January 2020 at 4:08am
background color of CXTPRecentFileListBox

Please teach me how to change the background color of CXTPRecentFileListBox.
I want to change the color from white to theme color.



At the time of version 18.6.0, we could do it with the following changes.
but it does not work in 19.1.0.

> you need to call SetTransparent(FALSE)  for gallery control.
> If you use CXTPRibbonBackstagePageRecent  then see implementation of CXTPRibbonBackstagePageRecent::SetTheme(). It calls 
> m_wndList.GetGallery()->SetTransparent(FALSE);
> before change theme.

> By default this option is false, see constructor CXTPControlGallery::CXTPControlGallery().

> Set breakpoint in CXTPControlGallery::SetTransparent() or data breakpoint for 
> CXTPControlGallery::m_bTransparent to see where it is changed.


[Development environment]
Windows10 Pro Japanese
VisualStudio2015
Toolkit Pro for Visual C++ 19.1.0





Replies:
Posted By: Fredrik
Date Posted: 03 February 2020 at 12:17pm
Shouldn't be more than a call to CXTPRibbonBackstagePageRecent::SetTheme(xtpControlThemeOffice2013) ?

I get a gray background for the recent file list when I change to one of the dark themes. I'm calling SetTheme in OnSetActive but there's probably a better place to do it.


-------------
Windows 10, Visual Studio 20157, Toolkit Pro 18.3.0


Posted By: hiro-ta
Date Posted: 07 February 2020 at 2:04am
Thank you for your reply.
I tried the following but it didn't work.

BOOL CXTPRibbonBackstagePageRecent::OnSetActive()
{
m_wndList.BuildItems();
SetTheme(xtpControlThemeOffice2013);
return TRUE;
}




Print Page | Close Window