1. Colin Cruikshank
  2. PowerBuilder
  3. Thursday, 1 October 2020 15:22 PM UTC

Is there a way using the Themes json file to dynamically set the box images for a protected datawindow column checkbox style control? Looks like it can be done for a Checkbox control by setting:

 

       "disabled-state":
             {
                "background-color":"#F7F7F7",
                "text-font":{"color":"#B8C2CC"},
                "box-images":
                {
                    "unchecked":{"file":"checkbox-box-disabled-unchecked.bmp"},
                    "checked":{"file":"checkbox-box-disabled-checked.bmp"},
                    "indeterminate":{"file":"checkbox-box-disabled-indeterminate.bmp"}
                }
             }

But enabled is not a property of a datawindow column. I tried protecting the column, then adding this to the theme file (doesn't work):

 

         "dwo-column":
        {
            "drawing":true,
            "border":0,
            "border-color":"#d0d3d9",
            "background-color":"#FFFFFF",
            "text-font":{"color":"#3C465A"},
            "checkbox-type":
            {
              "drawing":true,

                "normal-state":
                {
                    "box-images":
                    {
                        "unchecked":{"file":"checkbox-box-normal-unchecked.bmp"},
                        "checked":{"file":"checkbox-box-normal-checked.bmp"},
                        "indeterminate":{"file":"checkbox-box-normal-indeterminate.bmp"}
                    }
                },

               "protected-state":
               {
                    "box-images":
                    {
                        "unchecked": { "file": "checkbox-box-disabled-unchecked.bmp" },
                        "checked": { "file": "checkbox-box-disabled-checked.bmp" },
                        "indeterminate": { "file": "checkbox-box-disabled-indeterminate.bmp" }
                     }
               }

 

But i'm guessing "protected-state" is not valid.

Accepted Answer
Ken Guo @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 21 October 2020 08:55 AM UTC
  2. PowerBuilder
  3. # Permalink

Hi Colin,

 

It is not supported.

The PB Theme functionality is expanded based on the original UI.

In the previous PB versions, Checkbox uses the same image under Project and non-project. So PB Theme can’t support customize the UI for the project state.

 

 Regards,

Ken

 

Comment
  1. Colin Cruikshank
  2. Wednesday, 21 October 2020 12:57 PM UTC
Thank you Ken. I work around it by adding checkbox controls behind the column controls with my desired look, then making the column controls invisible if they become disabled.
  1. Helpful
There are no comments made yet.
Benjamin Gaesslein Accepted Answer Pending Moderation
  1. Tuesday, 6 October 2020 05:37 AM UTC
  2. PowerBuilder
  3. # 1

I think it's not possible. There never was a distinct disabled/protected state for the checkbox edit style.

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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.