1. Libby Engelbret
  2. PowerBuilder
  3. Friday, 17 January 2020 18:39 PM UTC

I would like to customize a theme in PB 2019 to have a bold font.  Is there a way to do this?  If so, what is the JSON syntax?

Libby Engelbret Accepted Answer Pending Moderation
  1. Wednesday, 22 January 2020 21:54 PM UTC
  2. PowerBuilder
  3. # 1

Hi Michael,

thanks for responding.  I set it for every state except "disabled" and I still don't see it.  To make sure I was setting the right thing, I changed the color of the dwo.column text-font and that worked so I knew i was pointing to the correct place, but putting the weight in the exact same text-font section did nothing.

Comment
  1. Michael Kramer
  2. Wednesday, 22 January 2020 21:58 PM UTC
Maybe difference per control type/subtype which style elements are supported? . . .

Could you verify that setting weight for checkbox control actually works for you? Otherwise the environment makes a difference.
  1. Helpful
  1. Michael Kramer
  2. Wednesday, 22 January 2020 23:53 PM UTC
Hi Libby, I did some further testing.

FIRST => Documentation: Docs state that colors can be change but no info on test styles in general for any control type.

SECOND => Support for non-color style options is "partial". I experimented with bold = "Weight":700. CheckBox and CommandButton follows bold-marking. DataWindow columns and MultiLineEdit ignore it.

Mabybe we should nudge Appeon to expose which style options are available per component class? - or I go nuts testing out every single combo.
  1. Helpful
There are no comments made yet.
Libby Engelbret Accepted Answer Pending Moderation
  1. Wednesday, 22 January 2020 17:33 PM UTC
  2. PowerBuilder
  3. # 2

I tried this under the DataWindow node for the dwo.column.  It does not appear to work. 

"dwo-column":
{
"text-font":{"color":"#000000","weight":700},

 

I validated my JSON, so I know that's not the problem.  Any ideas?

Comment
  1. Michael Kramer
  2. Wednesday, 22 January 2020 18:53 PM UTC
Which "state" sub-group did you add it to. Note: I added under "normal-state".

Another idea which is fast to test is "hover-state". As soon as your cursor moves across the checkbox it lights up in bold.



-- sorry, I just noticed: You are testing DWO-COLUMN within DataWindow?

That contains a multitude of edit-styles and states so you may have added/edited in a "section" that covers a different <item x state> that you desired.



If you start on checkbox like me => does it work on checkbox control on a window?

DataWindow is a true giant when it comes to theme setup. Rather start small and expand from there.
  1. Helpful
There are no comments made yet.
Michael Kramer Accepted Answer Pending Moderation
  1. Friday, 17 January 2020 20:09 PM UTC
  2. PowerBuilder
  3. # 3

Hi, when I do this in my theme.json file, I get bold.

Remember to set BOLD for every state that needs to display in bold!

...
"checkbox":
{
    "drawing":true,
    "normal-state":
    {
        "text-font":{"color":"#000000", "weight":700}, // <=== WEIGHT
...

//  NOTE: Weight values:
//  100: Light
//  400: Regular
//  700: Bold
Comment
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.