Print Page | Close Window

One theme for all controls?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=22836
Printed Date: 07 May 2024 at 9:52am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: One theme for all controls?
Posted By: maxxan
Subject: One theme for all controls?
Date Posted: 11 January 2016 at 8:13am
Is there a way to set one theme for the app (say VS2015) and then all controls uses that theme or do I have to set the theme for every single control, like report control, pane manager, task panels etc? Sounds very inconvenient that that's the case!

I tried
XTPThemeDLL()->SetHandle(xtpIniVisualStudio2015Dark);
CXTPPaintManager::SetTheme(xtpThemeVisualStudio2015);

in OnCreate, before any other control is created, but that does just change the theme for ribbons and the frame, but all controls in the app have a different theme..



Replies:
Posted By: cpede
Date Posted: 11 January 2016 at 8:44am
I fully understand your frustration. Just look at the samples, how many time SetTheme, SetStyle etc. are called.

I wrote a similar question in:  http://forum.codejock.com/forum_posts.asp?TID=22449" rel="nofollow - http://forum.codejock.com/forum_posts.asp?TID=22449

I really hope CodeJock consider this.

-cpede


-------------
Product: Xtreme ToolkitPro (20.3.0)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)


Posted By: maxxan
Date Posted: 11 January 2016 at 9:30am
Yeah, it would be so much better if it was possible to set a theme for the whole application.


Posted By: kstowell
Date Posted: 11 January 2016 at 6:40pm
You can use your top level window to send a WM_XTP_SETCONTROLTHEME message to all Controls objects like Buttons, Edit, etc that will allow you to make a single call.  We will be adding this functionality to remaining classes as well in the near future.

XTPThemeDLL()->SetHandle(xtpIniVisualStudio2015Light);
SendMessageToDescendants(WM_XTP_SETCONTROLTHEME, xtpControlThemeVisualStudio2015);
RedrawWindow(0, 0, RDW_ALLCHILDREN|RDW_INVALIDATE|RDW_ERASE);


-------------
Kirk Stowell, President and CEO
CODEJOCK SOFTWARE SOLUTIONS<


Posted By: maxxan
Date Posted: 12 January 2016 at 2:37am
Ok, so I create all controls first, then set the theme..

Maybe you should add that when a control is created, it should set its theme to what is currently set as a default theme.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net