1. Mark Jones
  2. PowerBuilder
  3. Thursday, 22 August 2019 17:23 PM UTC

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
  1. Saturday, 24 August 2019 22:06 PM UTC
  2. PowerBuilder
  3. # Permalink

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
  1. Roland Smith
  2. Saturday, 24 August 2019 23:59 PM UTC
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. Helpful
  1. Miguel Leeuwe
  2. Sunday, 25 August 2019 00:17 AM UTC
Thanks Roland, yes that was it. I stumbled on that when trying to use manifest files to avoid COM registration.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Sunday, 25 August 2019 01:39 AM UTC
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. Helpful
There are no comments made yet.
Mark Jones Accepted Answer Pending Moderation
  1. Thursday, 22 August 2019 18:25 PM UTC
  2. PowerBuilder
  3. # 1

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
  1. Mark Jones
  2. Thursday, 22 August 2019 20:19 PM UTC
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. Helpful
There are no comments made yet.
Aron Cox Accepted Answer Pending Moderation
  1. Thursday, 22 August 2019 19:19 PM UTC
  2. PowerBuilder
  3. # 2

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
  1. Mark Jones
  2. Thursday, 22 August 2019 20:32 PM UTC
Thanks, I will check with the person who does the builds to see what settings he uses.
  1. Helpful
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Thursday, 22 August 2019 19:26 PM UTC
  2. PowerBuilder
  3. # 3

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
  1. Mark Jones
  2. Thursday, 22 August 2019 19:32 PM UTC
I agree....
  1. Helpful
There are no comments made yet.
Mark Jones Accepted Answer Pending Moderation
  1. Thursday, 22 August 2019 19:39 PM UTC
  2. PowerBuilder
  3. # 4

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.
Roland Smith Accepted Answer Pending Moderation
  1. Thursday, 22 August 2019 20:40 PM UTC
  2. PowerBuilder
  3. # 5

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.
Julie Jiang @Appeon Accepted Answer Pending Moderation
  1. Friday, 23 August 2019 02:43 AM UTC
  2. PowerBuilder
  3. # 6

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
  1. Mark Jones
  2. Monday, 26 August 2019 14:00 PM UTC
Julie, Thank you I am delighted to hear that.



Mark
  1. Helpful
There are no comments made yet.
Mark Jones Accepted Answer Pending Moderation
  1. Monday, 26 August 2019 13:58 PM UTC
  2. PowerBuilder
  3. # 7

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.
  • Page :
  • 1


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