1. Mark Jones
  2. PowerBuilder
  3. Thursday, 22 August 2019

Apologies to everyone but as a company that has been using Powerbuilder for more than 20 years and we were excited for the themes hence rant below:

RANT BEGIN
Well, we have been disappointed by Powerbuilder again. We were excited to use themes to give our application a little sprucing up but have found that they are for the most part useless to us! We will be able to use the scroll bars and sliders and not much else.

1) Themes are not applied to user objects - any sophisticated application tends to use a lot of user objects!
2) Using a theme on a datawindow object replaces any datawindow expressions you might have to dynamically control color etc. Again any mature powerbuilder application probably has a lot of code that is written to control colors etc of object dynamically using datawindow expressions.
3) Radiobuttons and checkboxes are forced to right text if themes are applied.

It would be wonderful if the themes had not been implemented on an all or nothing basis. For example if you edit the json file and removed the background color attribute completely for a dwo.column then it would keep using the original value programmed or "modified" on the datawindow but instead it just uses a default value.  Or you could turn off the theme in script for a specific object.

All we ever wanted was for Powerbuilder to have modern looking checkboxes and radiobuttons so our application does not look like it came from the 1990s.
RANT END

 

WHAT TO DO?

I think we can create user objects to make modern looking replace window level radiobuttons and checkboxes but for a datawindow it is a little trickier.
A lot of our datawindows are dynamic or created by our customers so this would need to be done at run time.
We could creating code to dynamically switch out dw radio buttons with pictures and then have ancestor click event code for the pictures to emulate radio buttons but I see it as being challenging.

Has anyone got any other workarounds for datawindow checkboxes or radiobuttons?

Mark

Accepted Answer
Miguel Leeuwe Accepted Answer Pending Moderation
0
Votes
Undo

It's been said already by others but just to be clear:

On Windows 10 you'll always get the "flattened" look, when:

- running the application from the IDE.

- running an executable which was not compiled with the "windows classic style" checkbox marked in the project painter.

 

Comment
The 'Windows classic style' option being checked tells the compiler to NOT include a manifest in the EXE that tells the operating system to use the 'new' Microsoft Controls style.
  1. Roland Smith
  2. Saturday, 24 August 2019
Thanks Roland, yes that was it. I stumbled on that when trying to use manifest files to avoid COM registration.
  1. Miguel Leeuwe
  2. Sunday, 25 August 2019
Hi Miguel;

It doesn't matter what style you choose in a PB app as PowerServer has its own style for web & mobile that it applies automatically.

Regards ... Chris
  1. Chris Pollach
  2. Sunday, 25 August 2019
There are no comments made yet.
  1. Saturday, 24 August 2019
  2. PowerBuilder
  3. # Permalink
Mark Jones Accepted Answer Pending Moderation
0
Votes
Undo

Thanks everyone.  I will check with the compiler on what settings he had when compiling the app and look into that!

 

Mark

Comment
There are no comments made yet.
  1. Monday, 26 August 2019
  2. PowerBuilder
  3. # 1
Julie Jiang @Appeon Accepted Answer Pending Moderation
1
Votes
Undo

Hi Mark, 

We appreciate your feedbacks. Please note that we will further enhance the themes in the coming versions.  For example, 2019 R2 will allow you to configure theme settings for selected controls or objects.

Regarding this comment, 

"2) Using a theme on a datawindow object replaces any datawindow expressions you might have to dynamically control color etc. Again any mature powerbuilder application probably has a lot of code that is written to control colors etc of object dynamically using datawindow expressions."

Actually, the current behavior is: "With DataWindows, after you apply a UI theme, the UI settings (except border and resizable) of DataWindow are determined by the “theme.json” file but can be changed by the expression or the Modify method."

If you do find that the theme cannot work together with expressions, please contact Appeon Support and open an ticket.

Best regards... Julie

 

Comment
Julie, Thank you I am delighted to hear that.



Mark
  1. Mark Jones
  2. Monday, 26 August 2019
There are no comments made yet.
  1. Friday, 23 August 2019
  2. PowerBuilder
  3. # 2
Roland Smith Accepted Answer Pending Moderation
1
Votes
Undo

I submitted a bug with themes. When your app does not use themes and you do not deploy PBTHEME190.DLL with your runtime, the app runs very slowly. Scrolling a grid datawindow is particularly slow.

My guess is that despite them being turned off, it is constantly attempting to locate the DLL in the system path so it can be loaded into memory.

It is possible you have stumbled across a bug where it is applying theming when themes are not activated.

Comment
There are no comments made yet.
  1. Thursday, 22 August 2019
  2. PowerBuilder
  3. # 3
Mark Jones Accepted Answer Pending Moderation
0
Votes
Undo

Thanks for your responses!   I recompiled the theme test app in classic mode with no manifest and still get flattened objects both in development and as executable.    Even in preview mode when editing a datawindow I am seeing flattened objects - see attached file.   It is as though the PB environment is picking up a theme itself...

Attachments (1)
Comment
There are no comments made yet.
  1. Thursday, 22 August 2019
  2. PowerBuilder
  3. # 4
Roland Smith Accepted Answer Pending Moderation
2
Votes
Undo

I think it would have been better to have the theme set at the object/window level and then allow it to propagate through the entire app via inheritance. Individual controls within the DataWindow would have a theme setting.

 

Comment
I agree....
  1. Mark Jones
  2. Thursday, 22 August 2019
There are no comments made yet.
  1. Thursday, 22 August 2019
  2. PowerBuilder
  3. # 5
Aron Cox Accepted Answer Pending Moderation
0
Votes
Undo

Check your build options in the PB IDE. Do you have 'Use Windows classic style' ticked or unticked? That can affect the look of a build application. Note also, if you have a manifest file with your application, it can turn on / off the 'new' Windows look too. Aslo check your setting on the Security tab for Generate options. The tick box, I believe, only works if you have it set to 'Embedded manifest'.

Comment
Thanks, I will check with the person who does the builds to see what settings he uses.
  1. Mark Jones
  2. Thursday, 22 August 2019
There are no comments made yet.
  1. Thursday, 22 August 2019
  2. PowerBuilder
  3. # 6
Mark Jones Accepted Answer Pending Moderation
0
Votes
Undo

I have now got a weird behaviour in my development environment that I cannot explain.   A compiled version of my application is showing 3d radio buttons whereas in my development environment it now is flattening my radiobuttons with no theme associated with the application object nor any code to apply a theme.  Is there a mysterious notheme theme which influences behaviour.   Even stranger is that a collegue running the same compiled version with no themes is getting flattened radio buttons.   I restarted my computer to see if that made a difference and it does not. 

 

Comment
I have recently upgraded to Windows 10 and I believe the cause of the flattened checkboxes and radio buttons is the Windows 10 theme - however this only happens in the development environment. A compiled version of the app (compiled on a different computer) does not display the flattened objects. Does anyone know how I can force a PB app to use flattened style objects in the compiled version?
  1. Mark Jones
  2. Thursday, 22 August 2019
There are no comments made yet.
  1. Thursday, 22 August 2019
  2. PowerBuilder
  3. # 7
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.