- kevin kevin rowe
- PowerBuilder
- Thursday, 5 May 2022 03:05 PM UTC
We are using Powerbuilder 2021 build 1509
If I use ApplyTheme(string) in my code from anywhere during the initial start up it works fine
application open event
main window open event
After I have started a sub window with a menu operation, it does not matter where I put the code in the sub window or the main window, if the ApplyTheme() function is called, the IDE crashes.
I have tried running this in the sub window, as call and post, and as a function and as part of the event handler for the sub window activation.
All scenarios result in the IDE crashing just after the main window gets themed.
the help says
"The ApplyTheme method should be called when all windows are closed, for example, it can be called in the Application Open event when all of the child windows are not yet opened."
Does this mean that it won't affect previously opened windows properly (yet the main window does change if you run this in the main window open event) or that it is not designed to be run in anything except application open?
Basically, I'm trying to create a look-and-feel editor for the application, and the help seems to imply that you can run this function to set a theme then open a window and have it displayed in that theme.
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.