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?
- You are here:
- Home
- Q&A
- Q&A
- PowerBuilder
- Customizing theme, bold font
- Libby Engelbret
- PowerBuilder
- Friday, 17 January 2020 18:39 PM UTC
- Friday, 17 January 2020 20:09 PM UTC
- PowerBuilder
- # 1
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.
- Wednesday, 22 January 2020 17:33 PM UTC
- PowerBuilder
- # 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
- Michael Kramer
- 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.
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.
-
Helpful Loading... Helpful 0
There are no comments made yet.
- Wednesday, 22 January 2020 21:54 PM UTC
- PowerBuilder
- # 3
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
- Michael Kramer
- 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.
Could you verify that setting weight for checkbox control actually works for you? Otherwise the environment makes a difference.
-
Helpful Loading... Helpful 0
- Michael Kramer
- 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.
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.
-
Helpful Loading... Helpful 0
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.
However, you are not allowed to reply to this question.
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here. Register Here »