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.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Friday, 5 April 2024 09:25 AM UTC
  2. PowerBuilder
  3. # 1

@Luis: you should learn how to say "thanks". No one is being payed to answer and resolve your problems.

@Vinicius: instead of hijacking someone else's post, create a new one.

Thank you.

Comment
  1. Miguel Leeuwe
  2. Monday, 8 April 2024 08:57 AM UTC
lol: It's never too late to learn. You need a button to say thanks? The date of Vinicius' post is 4th of April 2024.
  1. Helpful
  1. John Fauss
  2. Monday, 8 April 2024 14:47 PM UTC
I’m behind you 100%, Miguel. A simple “Thank you” takes no time to type out and conveys appreciation for the time and effort spent by the numerous volunteers who assist their fellow developers.
  1. Helpful 1
There are no comments made yet.
vinicius petrolli Accepted Answer Pending Moderation
  1. Thursday, 4 April 2024 19:15 PM UTC
  2. PowerBuilder
  3. # 2

I'm having problems in creating a specific behavior for a specific window.

It's a response window (login window). I don't want it to have borders, so I duplcated the "window" code in the theme.json, renaming it to "w_login" (code below) and changing the margin values to [0,0,0,0], but it didn't work. Powerbuilder keeps getting the border theme from the "window" section ([3,30,3,3]).



"w_login":

{

"drawing":true,

"background-color":"#F4F4F4",

"title":

{

"active-state":

{

"background-color":"#4188F1",

"text-font":{"color":"#F4F4F4"}

},

"inactive-state":

{

"background-color":"#EBEBEB",

"text-font":{"color":"#F4F4F4"}

}

},

"statusbar":

{

"background-color":"#4188F1",

"text-font":{"color":"#F4F4F4"}

},

"border":

{

"margin":[0,0,0,0],

"active-state":

{

"border-color":"#4188F1"



},

"inactive-state":

{

"border-color":"#EBEBEB"

}

...

...

...

...

Comment
  1. John Fauss
  2. Monday, 8 April 2024 14:53 PM UTC
PLEASE do not hijack a thread. If you need ask a question, just type it in a new post, where it will have better visibility to the entire Community.
  1. Helpful
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Friday, 22 July 2022 09:19 AM UTC
  2. PowerBuilder
  3. # 3

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
  1. vinicius petrolli
  2. Thursday, 4 April 2024 19:12 PM UTC
I'm having problemas in creating a specific behavior for a specific window.

It's a response window (login window). I don't want it to have borders, so I duplcated the "window" code in the theme.json, renaming it to "w_login" (code below) and changing the margin values to [0,0,0,0], but it didn't work. Powerbuilder keeps getting the border theme from the "window" section ([3,30,3,3]).



"w_login":

{

"drawing":true,

"background-color":"#F4F4F4",

"title":

{

"active-state":

{

"background-color":"#4188F1",

"text-font":{"color":"#F4F4F4"}

},

"inactive-state":

{

"background-color":"#EBEBEB",

"text-font":{"color":"#F4F4F4"}

}

},

"statusbar":

{

"background-color":"#4188F1",

"text-font":{"color":"#F4F4F4"}

},

"border":

{

"margin":[0,0,0,0],

"active-state":

{

"border-color":"#4188F1"



},

"inactive-state":

{

"border-color":"#EBEBEB"

}

...

...

...

...
  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.