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?
- You are here:
- Home
- Q&A
- Q&A
- PowerBuilder
- theme.json tab settings overriding TabTextColor (2019R2)
- Benjamin Gaesslein
- PowerBuilder
- Thursday, 6 August 2020 09:19 AM UTC
- Friday, 4 March 2022 03:01 AM UTC
- PowerBuilder
- # 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
- Thursday, 3 March 2022 14:17 PM UTC
- PowerBuilder
- # 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.
- Thursday, 6 August 2020 13:42 PM UTC
- PowerBuilder
- # 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
- Benjamin Gaesslein
- Friday, 7 August 2020 05:32 AM UTC
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.
-
Helpful Loading... Helpful 0
- Armeen Mazda @Appeon
- Friday, 7 August 2020 15:21 PM UTC
-
Helpful Loading... Helpful 0
- Page :
- 1
However, you are not allowed to reply to this question.