1. Luis Pesaressi
  2. PowerBuilder
  3. Friday, 22 July 2022 07:11 AM UTC

Hi , how can apply to Theme in specific window or Object , example I have a windows with name  "w_buscar"

 

{
"meta-info":
{
"version":"190"
},
"w_buscar":          THIS NOT WORK
{
"drawing":true,
"background-color":"#FFFFFF",
"title":
{
"active-state":
{
"background-color":"#2563EB",
"text-font":{"color":"#FFFFFF"}
},
"inactive-state":
{
"background-color":"#FFFFFF",
"text-font":{"color":"#999999"}
}
},

thanks

Luis

Accepted Answer
Andreas Mykonios Accepted Answer Pending Moderation
  1. Friday, 22 July 2022 11:32 AM UTC
  2. PowerBuilder
  3. # Permalink

You say you are using PB 2021. But in the json it is mentioned:

{
   "version":"190"
},

You need to assure that the themes you are modifying are of the same version of powerbuilder.

Your json seems to have errors. I tried to resolve them:

{
	"meta-info": {
		"version": "190"
	},
	"w_buscar": {
		"drawing": true,
		"background-color": "#FFFFFF",
		"title": {
			"active-state": {
				"background-color": "#2563EB",
				"text-font": {
					"color": "#FFFFFF"
				}
			},
			"inactive-state": {
				"background-color": "#FFFFFF",
				"text-font": {
					"color": "#999999"
				}
			}
		}
	}
}

The most important, It will not work the way you did try. You must keep the original theme.json structure. You may modify it by adding your w_buscar customization which must be similar to window (so it must include statusbar etc.). If you want the theme to be applied only to your window then you will have to disable controls that should not be affected by settig "drawing":false. But this will probably disable rendering of controls in w_buscar. You may need to add specific sections to theme json for those specific controls used on that window like that:

"w_buscar.uo_1.cb_1":
{
  ... //You should copy syntax in "commandbutton" node from "theme.json" file.
}

You should study documentation found on the following link: Working with Targets - - Users Guide (appeon.com).

Andreas.

Comment
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Friday, 22 July 2022 09:19 AM UTC
  2. PowerBuilder
  3. # 1

Hi.

You should mention version of powerbuilder you are using.

Andreas.

Comment
  1. Luis Pesaressi
  2. Friday, 22 July 2022 10:34 AM UTC
Hi I use Version 2021 Build 1506 Runtime 21.0.0.1506

But I try too Version 2022 Build 1716 Runtime 22.0.0.1716



  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.