SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Studio

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 09-16-2010, 03:09 PM
chrishallowell chrishallowell is offline
Sage Advanced User
 
Join Date: Jan 2008
Posts: 169
Dynamic Background color in Studio

Is there a way to dynamically assign the background color of text? (If not text, some other widget?)

Example:
Say I have this code in Studio:
theStatus = Hallowell_football_Client_VitalScreenInfo_getStatus(vsInfo)

If theStatus = "Go" then I want to assign the background color of the text to green. If it's equal to "Stop" then the color should be red.

Attached is what I have so far.

Thanks!
Chris
Attached Images
File Type: jpg Dynamic Background color in Studio.jpg (170.9 KB, 80 views)
Reply With Quote
  #2  
Old 09-16-2010, 03:55 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Put a Shape or Image widget behind the text, like so:

Code:
Panel
  If theStatus
    > "Go"
      green Shape
    > "Stop"
      red Shape
  theDataCells
    Untitled Text widget
Code:
Panel
  If theStatus
    > "Go"
      "greenimage.png"
        Image
    > "Stop"
      "redimage.png"
        Image
  theDataCells
    Untitled Text widget
For a working example, look at the code in the stock STV that generates the colored cell backgrounds in the Program Guide.
__________________
-- Greg
Reply With Quote
  #3  
Old 09-16-2010, 05:07 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
You could also just put a if equation in the background color of the panel theme for that text.

Code:
=If(theStatus=="Go",greencolor,redcolor)
green color and red color would of course be the 0XX... Color reference. You have to encapusulate them in quotes as well in the theme widget.
Reply With Quote
  #4  
Old 09-17-2010, 09:50 AM
chrishallowell chrishallowell is offline
Sage Advanced User
 
Join Date: Jan 2008
Posts: 169
Thanks guys. I got both ways to work.
Reply With Quote
Reply


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

Advanced Search
Display Modes

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
Customization request: Dynamic menus without dynamic menus ;-) owilsky SageTV Customizations 16 07-07-2009 03:33 PM
OSD Background Color Karen0302 SageTV Software 1 06-05-2006 03:10 PM
Changing the Video Background Color mike1961 SageTV Software 4 04-20-2006 09:34 PM
any chances of altering the graphics in sage without studio? studio users please read reboot_this SageTV Customizations 1 12-03-2004 04:03 AM
Video Background Color mightyt SageTV Customizations 4 08-14-2004 09:49 PM


All times are GMT -6. The time now is 06:26 AM.


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