Custom themes – PB Docs 2022

Custom themes

You can add a new folder in the theme path to hold your
custom themes. It is recommended that you directly make a copy of
an existing system theme folder and then make changes to the copy.
Make sure the copied folder contains the theme.json file, so the
folder name will be automatically recognized as the theme name and
listed for selection in the Themes tab.

Note

If you directly make changes to the system theme, the
changes may lose after you re-install or upgrade PowerBuilder
IDE.

Each individual control or object can have its own theme
settings, for example, one button can have theme settings
different from the other buttons. And controls of the same type in
the same window/user object can have their own theme settings, for
example, all group boxes in one window can have theme settings
different from the group boxes in the other window.

Therefore you can create custom themes to configure theme
settings for a specific control or object, or controls or objects
of a specific type.

Unsupported

The dynamically created DataWindow is unsupported to have
custom theme settings.

The dynamically created user object is unsupported to have
custom theme settings.

To create custom themes:

  1. Open the “%AppeonInstallPath%PowerBuilder
    [version]IDE heme” directory, copy a system theme folder,
    and rename it.

  2. In your theme folder where the theme.json file exists,
    add one or more custom theme definition files.

    • The custom theme file must be named in this format:
      theme-[xxxx].json.

      The file prefix must be “theme-“, [xxxx] can be any
      text, and the extension must be .json, for example,
      theme-control.json, theme-dw.json, etc.

    • The settings in the file can be a subset or all of
      the theme.json file (see Understanding
      the theme.json file
      for more about the theme.json
      file).

      The nodes that host theme settings are the system
      object or control name (such as “checkbox”,
      “commandbutton” etc.) in theme.json; but the nodes that
      host theme settings in the custom theme file must be the
      name that points to the specific object or control (such
      as “w_main.uo_1.cb_1”, “w_main$commandbutton” etc.) that
      will apply the settings. For example,

  3. In the custom theme file, configure the theme settings
    for a window, a custom visual user object, a standard visual
    user object, a control/object, or controls/objects of the same
    type in the window or user object.

    For detailed information and examples, refer to the next
    section Configuring the custom
    theme
    .


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x