1. Markus Eckert
  2. PowerBuilder
  3. Tuesday, 16 February 2021 14:38 PM UTC

I can't find a way to change the color of the Trackbar controls. They always appear "Windows 95 gray"

Is there really no other way to change the color of this control other than reworking the entire app to work with the Theme feature?

Regards,
Markus

Who is viewing this page
Accepted Answer
Ronnie Po Accepted Answer Pending Moderation
  1. Tuesday, 16 February 2021 23:10 PM UTC
  2. PowerBuilder
  3. # Permalink
3
Votes
Undo

You can use a theme to control only VTrackBar and HTrackBar controls. Using an existing theme as a starting point, just edit the theme.json file and globally replace every

"drawing":true

with

"drawing":false

EXCEPT for the VTrackBar and HTrackBar sections, and edit those settings as you see fit.

It's quick and worth a try.

Comment
Thank you, I hadn't considered this option.

I might even try enabling more parts of Theme, since most of the problems with enabling themes in our application are centered around DW design.
  1. Markus Eckert
  2. Wednesday, 17 February 2021 07:51 AM UTC
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Tuesday, 23 February 2021 17:33 PM UTC
  2. PowerBuilder
  3. # 1
0
Votes
Undo

I'm going to second the implied suggestion Markus listed: namely that EVERY PowerBuilder control ought to have a COLOR expression in addition to any others they currently possess.

This seems like a no-brainer to me and would make color customization both granular and easy.

JMHO,

Olan

Comment
There are no comments made yet.
Julie Jiang @Appeon Accepted Answer Pending Moderation
  1. Monday, 22 February 2021 08:57 AM UTC
  2. PowerBuilder
  3. # 2
0
Votes
Undo

Hi Markus, 

Is it possible for you to provide us a test case that can reproduce the "problems with enabling themes in our application are centered around DW design"?  Our team hopes to look into this and checks for the fix of the problem.

Best regards, Julie 

 

Comment
Hi Julie

This isn't a technical problem, it's just that many of our datawindows use expressions to set Background and Foreground colors. Those clash (visually) with the changes that enabling the included themes bring.

It's just something we'd have to spend time to work out (either by changing the DW or the Themes)

Regards, Markus
  1. Markus Eckert
  2. Monday, 22 February 2021 09:13 AM UTC
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Tuesday, 16 February 2021 22:12 PM UTC
  2. PowerBuilder
  3. # 3
0
Votes
Undo

Hi, Markus -

PB uses the standard Windows controls (except in DataWindows, where they are emulated by PB) unless, as Armeen mentioned, you uses PB themes or a third-party alternative set of visual controls such as PBUltimateSuite. Windows uses several of its system color settings to render "3D" objects such as command buttons, scrollbar thumbs, scrollbar background, etc.

Technically, yes, the colors used to render the standard TrackBar controls CAN be changed, but only by altering the Windows system color settings for 3D objects via the Windows SetSysColor API function. However, doing so changes the color for all types of 3D objects (not just scroll bars) across all applications that utilize the standard Windows Trackbar controls. This is not a very practical solution and I therefore do NOT suggest that you do this.

This is probably a major reason the use of "skins", themes, and the like have grown in popularity.

Regards, John

Comment
Yeah, changing the OS colors is out of the question.

I was just surprised because it's the first control I've found with no color setting whatsoever. All other builtin controls I've used looked perfectly alright on a white window background.
  1. Markus Eckert
  2. Wednesday, 17 February 2021 07:59 AM UTC
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 16 February 2021 15:54 PM UTC
  2. PowerBuilder
  3. # 4
1
Votes
Undo

Hi Marckus,

The UI Themes feature of PowerBuilder lets you skin the VTrackBar and HTrackBar along with most of the other UI controls.  You need to be on PB 2019 R2 or newer to get this feature.  Here is some more info about UI Themes, including tech resources at the bottom of this page: https://www.appeon.com/products/powerbuilder/ui-modernization

If you don't want to use the UI Themes feature, the only other alternative I am aware of is to use the third-party product  Ultimate Suite for PowerBuilder but not sure if it provides TrackBar control: https://www.pbultimatesuite.com/EN/modernize-pb-interface/pbus-themes-styles.html

Best regards,
Armeen

Comment
We're currently running 2019R2, but I was under the impression that themes were an all-or-nothing feature.

And since themes clashed badly with many of our custom designed DWs, we never looked much deeper into the feature.
  1. Markus Eckert
  2. Wednesday, 17 February 2021 08:08 AM UTC
Oh, I see. Ronnie’s suggestion is good one. I recommend carefully reading this tech article: https://community.appeon.com/index.php/articles-blogs/tutorials-articles/2-powerbuilder/301-applying-a-new-ui-theme-to-your-application-2
  1. Armeen Mazda @Appeon
  2. Wednesday, 17 February 2021 13:33 PM UTC
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.