SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Studio
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-04-2016, 10:16 AM
CollegeProject CollegeProject is offline
Sage Advanced User
 
Join Date: Aug 2016
Location: USA
Posts: 119
Question on Text properties and color

I am storing colors in properties files so they get stored like

Code:
Property=\#cc9933
for the color "#cc9933". It all returns fine in a string but for some reason when I set the color on a theme for the Font specifically it doesn't get set
say I have

Code:
ForegroundColor=GetProperty(property,"#cc9933")
The color doesn't get set. I have a feeling it's how the theme widget is parsing it vs a text widget. Whats odd is it also works ok in retrieving image names named after the color.

What am I missing?
Reply With Quote
  #2  
Old 11-04-2016, 10:28 AM
CollegeProject CollegeProject is offline
Sage Advanced User
 
Join Date: Aug 2016
Location: USA
Posts: 119
I believe it is the "\" adder the setproperty call is adding to it because looking in the default themes they don't have a "\" after the color...So anyone know how to remove the "\" from getting set in the property? it appears text widgets parse it correctly but the theme setting doesn't
Reply With Quote
  #3  
Old 11-07-2016, 01:33 PM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
Try
Code:
property=0xcc9933
ForegroundColor=GetProperty(property,"0xcc9933")
I'm assuming the different case of property/Property in your example is a typo

John
Reply With Quote
  #4  
Old 11-07-2016, 02:06 PM
CollegeProject CollegeProject is offline
Sage Advanced User
 
Join Date: Aug 2016
Location: USA
Posts: 119
Quote:
Originally Posted by JREkiwi View Post
Try
Code:
property=0xcc9933
ForegroundColor=GetProperty(property,"0xcc9933")
I'm assuming the different case of property/Property in your example is a typo

John
Ya I type on the post. I gave up on this after testing fully by putting calls in the color property of a theme widget that logged I can see these are only set on occasion. It appears to be at first draw and then they aren't rechecked for instance when an area is refreshed. So it kind of threw my dynamic coloring of fonts out the window. But it's ok at least I somewhat figure out why. It appears the theme widgets are more "permanent" setting than other widgets that refresh their attributes when the area is refreshed.
Reply With Quote
  #5  
Old 11-07-2016, 08:33 PM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
They way I've seen it done and done myself in the past is to check to see if the value has changed and if so reload the menu.

John
Reply With Quote
  #6  
Old 11-07-2016, 09:29 PM
CollegeProject CollegeProject is offline
Sage Advanced User
 
Join Date: Aug 2016
Location: USA
Posts: 119
Quote:
Originally Posted by JREkiwi View Post
They way I've seen it done and done myself in the past is to check to see if the value has changed and if so reload the menu.

John
That might work but sounds slow. I was changing the value often based on a selection. It's ok I went a different route thanks for trying to help! That makes sense that would trigger the refresh of the value.
Reply With Quote
  #7  
Old 11-08-2016, 12:57 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
Quote:
Originally Posted by CollegeProject View Post
Code:
ForegroundColor=GetProperty(property,"#cc9933")
I'm curious: are you setting the theme value via the GetProperty call or by using =SomeVariableName?

Setting it dynamically using a variable name, instead of using the API call, ought to work, as far as I recall.

And, yes, it uses a format of 0xRRGGBB, as is used in the default STV's theme.properties files.

Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
  #8  
Old 11-08-2016, 03:14 PM
CollegeProject CollegeProject is offline
Sage Advanced User
 
Join Date: Aug 2016
Location: USA
Posts: 119
Quote:
Originally Posted by Opus4 View Post
I'm curious: are you setting the theme value via the GetProperty call or by using =SomeVariableName?

Setting it dynamically using a variable name, instead of using the API call, ought to work, as far as I recall.

And, yes, it uses a format of 0xRRGGBB, as is used in the default STV's theme.properties files.

Andy
I've tried both somevariable and properties they just aren't instantly updated but like said above they are on a refresh of the menu but if the values or variables change in-between they aren't refreshed with the areas. No biggie I changed the way I was displaying.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I change text color? OverClock SageTV v7 Customizations 8 11-04-2012 10:40 AM
EPG Guide text color? Asmordean SageMC Custom Interface 2 06-30-2009 08:41 AM
Modify text color? webwalker SageMC Custom Interface 1 02-09-2009 10:22 PM
Change text Color in Cayars? dbfresh23 SageTV Customizations 3 03-25-2005 04:13 AM
Changing Text Color eruji SageTV Beta Test Software 1 03-25-2004 04:15 PM


All times are GMT -6. The time now is 11:16 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.