1. Riccardo Pasqualetti
  2. PowerBuilder
  3. Monday, 11 December 2023 16:33 PM UTC

Im'using a theme in my application

I have a datawindow userobject and i want change the background color of a text object

datawindow name: d_mag_situation

userobject name: uo_mag_situation

text object name: t_mrp_note

I can't find the right syntax to use in the json file

It's possibile change background color of a single text object in a datawindow?

Some attempts:

"d_mag_situation.t_mrp_note":
{
"drawing":true,
"border":2,
"border-color":"#CCCCCC",
"background-color":"#FFFF80",
"text-font":{"color":"#000000"}
}

"u_dw_situazione_mag.t_mrp_note":
{
"drawing":true,
"border":2,
"border-color":"#CCCCCC",
"background-color":"#FFFF80",
"text-font":{"color":"#000000"}
}

Thanks

 

 

kitty he @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 12 December 2023 05:06 AM UTC
  2. PowerBuilder
  3. # 1

Hi Riccardo,

 

Your syntax is incorrect.

There is a dwo-text object under datawindow in the Theme.json file. You should set the background-color for the text here. Here is an example:

“u_dw_situazione_mag”:

{

   “drawing”:true,

“dwo-text”:

   {

      “drawing”:true,

       “border”:2,

        “border-color”:”#CCCCCC”,

        “background-color”:”#FFFFFF”,

       “text-font”:{“color”:”#000000”}

}

}

 

Regards,

Kitty

Comment
  1. kitty he @Appeon
  2. Tuesday, 12 December 2023 05:14 AM UTC
The customization in Theme.json is for all objects of the same object type in dw. If you change background color of a single text object in a datawindow, you need to add an expression when designing dw or use the modify syntax in the code to modify it.
  1. Helpful 2
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.