Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Background color of CXTPRecentFileListBox
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Background color of CXTPRecentFileListBox

 Post Reply Post Reply
Author
Message
hiro-ta View Drop Down
Groupie
Groupie


Joined: 11 July 2013
Status: Offline
Points: 61
Post Options Post Options   Thanks (0) Thanks(0)   Quote hiro-ta Quote  Post ReplyReply Direct Link To This Post Topic: Background color of CXTPRecentFileListBox
    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


Back to Top
Fredrik View Drop Down
Senior Member
Senior Member


Joined: 22 June 2005
Status: Offline
Points: 167
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fredrik Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
hiro-ta View Drop Down
Groupie
Groupie


Joined: 11 July 2013
Status: Offline
Points: 61
Post Options Post Options   Thanks (0) Thanks(0)   Quote hiro-ta Quote  Post ReplyReply Direct Link To This Post 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;
}

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.094 seconds.