WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Custom Drop-Down Menus and Sliders (https://forum.worldviz.com/showthread.php?t=1499)

south_bank 05-17-2008 04:43 PM

Custom Drop-Down Menus and Sliders
 
Hi,

I was wondering if it is possible to customise the entire elements of sliders and drop down menus in Vizard. For my project I require a custom drop down menu, of Red colour rather than blue, and a slider with a custom bar and selector, as I need to attach a texture of multiple colours to the slider bar and I need a yellow selector.

If it is possible it's probably really obvious, but I can't find it anywhere so any help would be much appreciated!

Thanks

farshizzo 05-19-2008 02:38 PM

Sure, here is a script that shows how to customize the appearance of a drop-down menu and a slider:
Code:

import viz
viz.go()

droplist = viz.addDropList(pos=(0.5,0.5,0))
droplist.addItems(['one','two','three'])

droplist.color(viz.RED,viz.DROPLIST_BORDER)
droplist.color(viz.BLUE,viz.DROPLIST_BACK)
droplist.color(viz.YELLOW,viz.DROPLIST_TEXT)
droplist.color(viz.PURPLE,viz.DROPLIST_BACK_SEL)
droplist.color(viz.WHITE,viz.DROPLIST_TEXT_SEL)


slider = viz.addSlider(pos=(0.5,0.1,0))

slider.barpicture('ball.jpg')
slider.tickpicture('gb_noise.jpg')


south_bank 05-20-2008 04:27 AM

I knew it was something simple :o. Thanks a lot, again for the quick reply, it's really appreciated as I'm in the middle of my dissertation at the moment!


All times are GMT -7. The time now is 09:09 PM.

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