1. Mark Jones
  2. PowerBuilder
  3. Thursday, 17 February 2022 16:09 PM UTC

We are starting to use themes however we run into one issue that is very annoying.  I am hoping there is an easy solution! 

We have specified in our theme, radiobuttons and checkboxes and have not specified a background color.   When we display a window containing these objects they always display the background color of the window, not their current background color.   In our test case, we have an orange rectangle with a checkbox on top.   When we display without themes the checkbox text background can be set to the same orange and it will show up with this color at runtime.  However with themes on it always grabs the color of the window as the background of the text.  I know I can put overrides in the themes file for specific windows and objects however we have many many windows that would need to be listed and the ability to have a transparent background to this object type seems to be a very basic request.    I have found a setting called "background-transparent" and have tried setting that to false or true and it does not make a difference.   Is there a special them transparent color for the checkbox background and would that work?

Note: I found this in the Appeon documentation but it does not appear to be true, I tried putting a picture object comprising a single color behind my checkbox instead and the color of the text box background was still set to the windows background

  • The background color for the following control is transparent: CheckBox, RadioButton, GroupBox, StaticText, and StaticHyperLink; it cannot be changed in the PowerBuilder IDE or the theme.json file. But when they are placed on top of an unsupported control (such as Picture), their background color will not be transparent and can be set in the PowerBuilder IDE

     

     

 

 

Mark Jones Accepted Answer Pending Moderation
  1. Thursday, 17 February 2022 16:58 PM UTC
  2. PowerBuilder
  3. # 1

I am going to reply to my own question so that other people have the answer to this problem.

When using themes if you want your windows checkbox or radiobutton objects to use a specific color background instead of the windows background (e.g. they are inside an orange rectangle) then you need to create a picture object - point this to a bitmap with the color you want and then set the the background color of the checkbox/radiobutton to transparent!

 

Comment
  1. Armeen Mazda @Appeon
  2. Thursday, 17 February 2022 17:28 PM UTC
Thanks for sharing the solution!
  1. Helpful
  1. Miguel Leeuwe
  2. Thursday, 17 February 2022 23:40 PM UTC
Nice one!

Does it still behave as "transparent" if you'd have a button that changes the picture to be of another color? What I learned, playing around with transparent objects on top of others, is that the object with the transparent background simply 'copies' the color of the object that it's "on top of". It's not a "real" transparency?

regards

  1. Helpful 1
  1. Mark Jones
  2. Thursday, 24 February 2022 17:29 PM UTC
Thanks Miguel, I will check that.
  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.