WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 04-28-2015, 10:06 AM
ushag ushag is offline
Member
 
Join Date: Apr 2015
Posts: 3
Progress Bar

I was wondering how you would change the colors on a progress bar.
Reply With Quote
  #2  
Old 04-30-2015, 04:18 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
You can change the colors of a progress bar created with vizdlg or vizmenu by setting the object's theme. Take a look at the example script attached to post #3 of this thread to experiment with changing the theme. The following code changes the color of a progress bar by adding it to a vizinfo panel and changing the theme of the underlying vizdlg panel:

Code:
import viz
import vizinfo

viz.go()

info = vizinfo.InfoPanel('',icon=False)
slider = info.addItem(viz.addProgressBar(''))
slider.set(0.5)

#Set in colors for green theme
greenTheme = viz.Theme()
greenTheme.borderColor = (0.1,0.2,0.05,1)
greenTheme.backColor = (0.5,0.7,0.3,1)
greenTheme.lightBackColor = (0.6,0.8,0.4,1)
greenTheme.darkBackColor = (0.2,0.4,0.1,1)
greenTheme.highBackColor = (0.2,0.4,0.1,1)

info.getPanel().setTheme(greenTheme)
Reply With Quote
  #3  
Old 05-05-2015, 12:52 PM
ushag ushag is offline
Member
 
Join Date: Apr 2015
Posts: 3
Picking Colors for Progress Bar

Is there a table in which we can use to figure out the colors or is it based off of trial and error?
Reply With Quote
  #4  
Old 05-07-2015, 09:21 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Each of the theme properties takes normalized values for red, green, blue and alpha. Press 'Alt + 1' to open a color dialog in the Vizard IDE and insert RGB values into the script.
Reply With Quote
  #5  
Old 05-12-2015, 06:52 AM
ushag ushag is offline
Member
 
Join Date: Apr 2015
Posts: 3
Progress Bar

Thank you! That really helps!
Reply With Quote
Reply


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
lip-synching + Progress Bar djdesmangles Vizard 3 02-21-2008 12:37 PM
Avatars creation........ k_iwan Vizard 23 06-02-2007 04:35 AM
Progress bar Jerry Vizard 1 10-16-2006 11:22 AM


All times are GMT -7. The time now is 05:28 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC