1. kevin kevin rowe
  2. PowerBuilder
  3. Thursday, 5 May 2022 15: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. 

Ken Guo @Appeon Accepted Answer Pending Moderation
  1. Friday, 6 May 2022 05:48 AM UTC
  2. PowerBuilder
  3. # 1

Hi Kevin,

Though we require closing all windows before executing ApplyTheme, we are working on implementing executing ApplyTheme while the windows are still open. For this situation, I suggest:
1. Open Application Object -> Additional Properties -> Themes in PB IDE, select any theme in the default theme path C:\Program Files (x86)\Appeon\PowerBuilder 21.0\IDE\theme and save.
2. Full Build your application. Run and see if it works normally.
3. If the problem remains, please open a ticket to our support system (https://www.appeon.com/standardsupport/newbug) and upload an example case that can reproduce this issue for analysis.

Regards,
Ken

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 5 May 2022 17:46 PM UTC
  2. PowerBuilder
  3. # 2

Hi Kevin;

  FWIW: My framework can call the ApplyTheme() command at any time in the App's life cycle (processing state) and the entire App will change. You can see this in action if you download the OrderEntry Demo App and use the App's Menu to change the Theme. Note that the only exception is when you are removing the current Theme. The framework then prompts the App User to restart the App to complete the Theme removal.

FYI: https://sourceforge.net/projects/stdfndclass/files/Applications/PowerBuilder/OrderEntry

Regards ... Chris

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.