1. Luis Pesaressi
  2. PowerBuilder
  3. Monday, 12 August 2024 08:10 AM UTC

Hello, how can I change the color of the application, specifically the title bar and the cascading effect to all the windows, dynamically, the requirement is that each user can customize their application.

 

Thank you.

Luis

Luis Pesaressi Accepted Answer Pending Moderation
  1. Tuesday, 13 August 2024 21:46 PM UTC
  2. PowerBuilder
  3. # 1

Thanks for the recommendation, but we are not going to go to the 100 PCs to change the configuration, don't you know of any way that it can be changed by code in the application, thanks

 

Luis

Comment
  1. John Fauss
  2. Wednesday, 14 August 2024 03:40 AM UTC
@Luis - Except when themes are used, PB defers the drawing of a window's title bar (or "caption" in Windows terminology) to the Windows Operating System. The source syntax for a window object in PB currently does NOT support a title bar/caption color property, so the only way to do what you want is by customizing colors in the Windows OS.

You can verify that there is no title bar color property in PB windows by looking at the PB Help topic named "Window control" and the listed Properties table. Even when themes are used, an app's user cannot specify the title bar's color, other than by selecting the pre-defined theme, as Roland has stated.

If you feel strongly this functionality should be added to PB, I encourage you to submit an enhancement request.
  1. Helpful
  1. Miguel Leeuwe
  2. Wednesday, 14 August 2024 05:55 AM UTC
I don't think themes would solve the problem. If I understood well, the OP wan'ts to apply different colours for different groups of windows within the same application.
  1. Helpful
  1. David Peace (Powersoft)
  2. Wednesday, 14 August 2024 12:24 PM UTC
You can have custom Theme.json for specific windows etc, but that will get really messy.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 13 August 2024 12:25 PM UTC
  2. PowerBuilder
  3. # 2

Hi Miguel;

  I agree 100% with you on setting the application colours via the MS-Windows settings. Then making sure that your PB Apps map all their colour settings to the MS-Windows equivalent setting. That way, any app user can adjust all their App colours via the Windows control panel. That makes a consistent way of ensuring that your PB Apps follow what the App user picks which should be the best colours for them to use. It also allows your PB Apps to be consistent with all the other Window Apps. Something that I have found over decades of building & using GUI Apps to be the best flexible, customizable & consistent approach. Just my $0.02.

Regards ... Chris 

Comment
  1. Miguel Leeuwe
  2. Tuesday, 13 August 2024 16:59 PM UTC
Lol, Some managers don't have a clue about what a windows control is and ask for the impossible / unreasonable.
  1. Helpful
  1. Luis Pesaressi
  2. Tuesday, 13 August 2024 21:51 PM UTC
Themes are an alternative, but the user wants to create work groups to be able to identify each screen by color and know which group it belongs to, that is why I need to be able to make the user create a color for each group of people, this color is assigned to each user and the system automatically applies the color configuration when it starts. This is an alternative.



Thanks

Luis
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Tuesday, 13 August 2024 03:26 AM UTC
  2. PowerBuilder
  3. # 3

You can set the title colour in Windows, not in powerbuilder:

Comment
  1. David Peace (Powersoft)
  2. Tuesday, 13 August 2024 10:51 AM UTC
With regards to buttons, when we implemented multiple themes for users we had new buttons designed for each Theme that was allowed. We did cheat a little and created Theme specific menus that were inherited from the main menu and we dynamically change the Main menu tot he themed menu as required.



Having said that it's not for the faint hearted, retro fitting Themes is a big job as you also need to consider all those instances where you have checked the default colours or dynamically alter column backgrounds etc. All of these need to be dynamically changed to match the Theme. On the application we worked on the users were able to also choose their own colours to highlight data for specific options and values, all these had to be dynamically mapped to theme friendly colours.



  1. Helpful 1
  1. Miguel Leeuwe
  2. Tuesday, 13 August 2024 11:23 AM UTC
Yes, true, but I just gave the answer to a question that doesn't mention themes at all.

regards.
  1. Helpful
  1. Luis Pesaressi
  2. Tuesday, 13 August 2024 21:50 PM UTC
Themes are an alternative, but the user wants to create work groups to be able to identify each screen by color and know which group it belongs to, that is why I need to be able to make the user create a color for each group of people, this color is assigned to each user and the system automatically applies the color configuration when it starts. This is an alternative.



thanks

Luis
  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.