1. Richard Brooks
  2. PowerBuilder
  3. Monday, 27 January 2020 15:18 PM UTC

Once I've applied a theme is there any way to turn off themes? I tried applyTheme("") but that didn't work

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 27 January 2020 15:50 PM UTC
  2. PowerBuilder
  3. # 1

Hi Richard;

  Correct, there is no ApplyTheme (None!) option. What I do is set the Theme OFF in my Application Object. Then when the App User requests a return to "No Theme", I just execute a RESTART() command. That is the 100% safe way to reset any active theme until Appeon adds a Deactivate Theme function / feature.

Regards ... Chris

Comment
There are no comments made yet.
Michael Kramer Accepted Answer Pending Moderation
  1. Monday, 27 January 2020 15:27 PM UTC
  2. PowerBuilder
  3. # 2

Hi Richard,

There is no DisableThemes( ) system function. However, you can create a custom theme where you define "drawing":false for every visual object type.

I have attached such a  "none" theme. Unzip into your "theme190" folder so the filename becomes

...\theme190\none\none.json

Now, you can turn themes off by calling

ApplyTheme("none")

The theme feature is running but takes no action on any visual object type.

HTH /Michael

Attachments (1)
Comment
  1. Michael Kramer
  2. Monday, 27 January 2020 20:16 PM UTC
NOTE: I added two theme properties in the JSON file for documentation purposes, like a header comment in a function. ApplyTheme ignores them because it only reads "known" JSON properties.
  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.