1. Benjamin Gaesslein
  2. PowerBuilder
  3. Thursday, 6 August 2020 09:19 AM UTC

I quite like the results of themed tab objects but I have a few tabpages that are highlighted by setting a custom TabTextColor in the painter. This gets overwritten by the theme even when I remove the "text-font":{"color":"#..."} entry from the theme.json. Is there any way to change the TabTextColor of individual tabpages while having a theme active?

Julie Jiang @Appeon Accepted Answer Pending Moderation
  1. Friday, 4 March 2022 03:01 AM UTC
  2. PowerBuilder
  3. # 1

Hi Benjamin, 

After applying theme, you can only modify colors in DataWindow controls using Modify. All other controls (such as tab) do not support setting colors via PowerScript.

I will record it as a requirement that the theme.json and custome theme.json shall support setting TabTextControl and TabBackColor for specified tabpage.  For the time being, if you want to highlight certain tabpage, please consider the workaround of specifying a picture for the tabpage.

Best regards, Julie

Comment
There are no comments made yet.
Markus Kreuzer Accepted Answer Pending Moderation
  1. Thursday, 3 March 2022 14:17 PM UTC
  2. PowerBuilder
  3. # 2

I'm facing the same problem. I have treeviews and userobjects that are displayed with different background colors depending on the displyed data coming from the database.

I have learned that it is not possible to change colors at runtime when using UI theme. Either I have to disable drawing for an object completely lacking of the advantages of theming or I have theming with only one color possible.

Is that still correct and are you planning to make changes at runtime to a specific object possible?

I think this would greatly improve theming. In my application different colors are indicating different states of data and is very useful for the users. Not everything can be displayed with datawindows.

Comment
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Thursday, 6 August 2020 13:42 PM UTC
  2. PowerBuilder
  3. # 3

If you set the color using PowerScript that should take precedence over themes.

anothe option is to disable themes for a particular instance of the control.  

You can do that by setting a theme for the instance: https://docs.appeon.com/pb2019r2/pbug/ch04s04.html#Configuring_theme_settings_for_individual_controls

Then set drawing to false to disable: https://community.appeon.com/index.php/articles-blogs/tutorials-articles/2-powerbuilder/230-applying-a-new-ui-theme-to-your-application#technique

 

Comment
  1. Benjamin Gaesslein
  2. Friday, 7 August 2020 05:32 AM UTC
It seems that the TabTextColor is ignored completely when theming is enabled for tab-objects.

To further clarify the issue: throughout the application we use tab-objects that are populated with userobjects as tabpages at runtime. Some of these userobjects have their TabTextColor set to a highlight color. The issue is probably that the theme setting applies to the tab object itself, I've found no entry for inidividual tabpages. The "navigator" node seems to handle the look of all the tabs in a tab control. So I can either disable theming for the whole tab object or have to live with the missing highlighting for individual tabs. There is a "page" node but it seems to apply to the content only.
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Friday, 7 August 2020 15:21 PM UTC
Yes, you are exactly right! You need to decide which of those two compromises to go for. Sorry about 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.