1. Michael Kramer
  2. PowerBuilder
  3. Tuesday, 11 June 2019 21:57 PM UTC

I'm trying out UI Themes of PB 2019.

How can I turn themes off once I have turn any them on?

I have tried:

  • ApplyTheme("")
  • ApplyTheme(null)
  • ApplyTheme("Do Not Use Themes")

All to no avail. I found one solution but it feels like a workaround:

  • Copy one of the themes to new folder = "No Theme"
  • Edit theme.json to have "drawing":false for every UI object type.
  • Perform ApplyTheme("No Theme")

Is this my not knowing, a bug I should report, or expected behaviour?

TIA /Michael

Accepted Answer
Ken Guo @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 12 June 2019 02:53 AM UTC
  2. PowerBuilder
  3. # Permalink

Hi Michael,

ApplyTheme function doesn’t support turning off UI Theme. If you want to turn off UI Theme, you need to restart the application, and make sure the Application Object doesn’t have Theme set, nor should the ApplyTheme function be called.

Regards,
Ken

Comment
  1. Michael Kramer
  2. Wednesday, 12 June 2019 12:07 PM UTC
THX, Ken. /Michael
  1. Helpful
There are no comments made yet.
Michael Kramer Accepted Answer Pending Moderation
  1. Wednesday, 12 June 2019 16:56 PM UTC
  2. PowerBuilder
  3. # 1

Hi All,

Sometimes doing a Restart( ) of your app is unacceptable to the user even if the user wants to turn off theme visuals.

In case you want to try out my "No Theme" theme => I have attached the "minimal theme.json file" that is needed to turn off all theme visuals.

How to do:

  1.  Find folder where your PBT file is located (at runtime: where your .EXE file is located)
  2. Create subfolder named "theme190"
  3. Create another sub-subfolder = "theme190\No Theme"
  4. In this "inner" folder download and unzip the attached theme.json file.
  5.  When your app executes this statement, it will turn off all theme based visuals.
ApplyTheme(".\theme190\No Theme")

HTH
/Michael

Attachments (1)
Comment
  1. Chris Pollach @Appeon
  2. Friday, 14 June 2019 00:01 AM UTC
Thanks Michael!
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 12 June 2019 00:42 AM UTC
  2. PowerBuilder
  3. # 2

Hi Michael;

  I asked this same question in the Beta program and apparently thus far, there is no command or argument value to turn off "Theming" (hmm is that a real word) once it takes ahold. So what I did in my framework is to use the Restart () command to go back to a non-theme mode. You can see how it works by running the PB2019 Beta OrderEntry demo application ... https://sourceforge.net/projects/stdfndclass/files/Applications/PowerBuilder/OrderEntry/Beta/PB2019

HTH

Regards ... Chris

Comment
  1. Michael Kramer
  2. Wednesday, 12 June 2019 06:12 AM UTC
Thank you for sharing, Chris.

In favor of my "No Theme" theme is that it requires no Restart and it is fast.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 12 June 2019 18:59 PM UTC
Great idea Michael .. please submit a support ticket for this as an enhancement request!
  1. Helpful
  1. Michael Kramer
  2. Thursday, 13 June 2019 23:44 PM UTC
THX Chris, I will. /Michael

Statistics:

First: 141 files, 1564 kB -- change "drawing":true => false, but keep everything else.

Final: 1 file, 1184 B -- No images, just {"drawing":false} for each type.
  1. Helpful
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.